Package gov.usgs.earthquake.indexer
Class ExtentIndexerListener
java.lang.Object
gov.usgs.util.DefaultConfigurable
gov.usgs.earthquake.product.AbstractListener
gov.usgs.earthquake.indexer.DefaultIndexerListener
gov.usgs.earthquake.indexer.ReliableIndexerListener
gov.usgs.earthquake.indexer.ExtentIndexerListener
- All Implemented Interfaces:
IndexerListener,Configurable,Runnable
ExtentIndexerListener is an extension of the ReliableIndexerListener. It
populates the ExtentSummary table with viable products.
This listener takes an ExtentIndex for querying and table updates:
- index
- (Required) the ExtentIndex used for querying and updates
-
Field Summary
Fields inherited from class gov.usgs.earthquake.indexer.ReliableIndexerListener
productIndexFields inherited from class gov.usgs.earthquake.indexer.DefaultIndexerListener
IGNORE_ARCHIVE_DEFAULT, IGNORE_ARCHIVE_PROPERTY, PROCESS_ONLY_WHEN_EVENT_CHANGE_DEFAULT, PROCESS_ONLY_WHEN_EVENT_CHANGE_PROPERTY, PROCESS_PREFERRED_ONLY_DEFAULT, PROCESS_PREFERRED_ONLY_PROPERTY, PROCESS_UNASSOCIATED_DEFAULT, PROCESS_UNASSOCIATED_PROPERTYFields inherited from class gov.usgs.earthquake.product.AbstractListener
ATTEMPT_COUNT_PROPERTY, DEFAULT_ATTEMPT_COUNT, DEFAULT_RETRY_DELAY, DEFAULT_TIMEOUT, EXCLUDE_SOURCES_PROPERTY, EXCLUDE_TYPES_PROPERTY, INCLUDE_ACTUALS_PROPERTY, INCLUDE_DEVELOPMENTS_PROPERTY, INCLUDE_INTERNALS_PROPERTY, INCLUDE_SCENARIOS_PROPERTY, INCLUDE_SOURCES_PROPERTY, INCLUDE_TESTS_PROPERTY, INCLUDE_TYPES_PROPERTY, MAX_TRIES_PROPERTY, RETRY_DELAY_PROPERTY, TIMEOUT_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures listener, checking for correct typeprotected voidLoads the last index id in the extent table before the listener has to use itvoidprocessProduct(ProductSummary product) Hands product to index to be added to tableMethods inherited from class gov.usgs.earthquake.indexer.ReliableIndexerListener
getLastIndexId, getNextProducts, getProductIndex, onIndexerEvent, onProcessException, onProductGetException, run, setLastIndexId, setProductIndex, shutdown, startupMethods inherited from class gov.usgs.earthquake.indexer.DefaultIndexerListener
accept, accept, getProcessOnlyPreferredProducts, getProcessUnassociatedProducts, isIgnoreArchive, isProcessOnlyWhenEventChanged, setIgnoreArchive, setProcessOnlyPreferredProducts, setProcessOnlyWhenEventChanged, setProcessUnassociatedProductsMethods inherited from class gov.usgs.earthquake.product.AbstractListener
accept, getExcludeSources, getExcludeTypes, getIncludeSources, getIncludeTypes, getMaxTries, getRetryDelay, getTimeout, isIncludeActuals, isIncludeDevelopments, isIncludeInternals, isIncludeScenarios, isIncludeTests, setIncludeActuals, setIncludeDevelopments, setIncludeInternals, setIncludeScenarios, setIncludeTests, setMaxTries, setRetryDelay, setTimeoutMethods inherited from class gov.usgs.util.DefaultConfigurable
getName, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gov.usgs.util.Configurable
getName, setNameMethods inherited from interface gov.usgs.earthquake.indexer.IndexerListener
getMaxTries, getTimeout
-
Constructor Details
-
ExtentIndexerListener
public ExtentIndexerListener()
-
-
Method Details
-
configure
Configures listener, checking for correct type- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classReliableIndexerListener- Parameters:
config- configuration- Throws:
ConfigurationException- if incorrect type providedException- if missing product index
-
onBeforeProcessThreadStart
Loads the last index id in the extent table before the listener has to use it- Overrides:
onBeforeProcessThreadStartin classReliableIndexerListener- Throws:
Exception- if ExtentIndex can't do database transaction
-
processProduct
Hands product to index to be added to table- Overrides:
processProductin classReliableIndexerListener- Parameters:
product- the product to be added- Throws:
Exception- if ExtentIndex can't do database transaction
-