Package gov.usgs.earthquake.shakemap
Class ShakeMapIndexerWedge
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- gov.usgs.earthquake.product.AbstractListener
-
- gov.usgs.earthquake.distribution.DefaultNotificationListener
-
- gov.usgs.earthquake.shakemap.ShakeMapIndexerWedge
-
- All Implemented Interfaces:
NotificationIndexCleanup.Listener
,NotificationListener
,Configurable
@Deprecated public class ShakeMapIndexerWedge extends DefaultNotificationListener
Deprecated.Legacy interface to trigger pre-Indexer ShakeMap processing. The Old ShakeMap Indexer is no longer used, and this class is deprecated. When a shakemap product arrives, it is only processed if one of these is true:- doesn't already exist
- from preferred source (product source = eventsource)
- from same source as before
- remove previous version
- unpack new version, if not a delete
- trigger legacy indexer
- send tracker update
- indexerCommand
- The shakemap indexer command to run. Defaults to
/home/www/vhosts/earthquake/cron/shakemap_indexer.php
. - shakemapDirectory
- The shakemap event directory. Defaults to
/home/www/vhosts/earthquake/htdocs/earthquakes/shakemap
. - timeout
- How long in milliseconds the indexer is allowed to run before being terminated.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMMAND_TIMEOUT_PROPERTY
Deprecated.Configurable property for command timeout.static java.lang.String
DEFAULT_COMMAND_TIMEOUT
Deprecated.Default command timeout.static java.lang.String
DEFAULT_SHAKEMAP_DIRECTORY
Deprecated.Default shakemap directory.static java.lang.String
DEFAULT_SHAKEMAP_INDEXER_COMMAND
Deprecated.The shakemap indexer command to execute.static java.lang.String
SHAKEMAP_DIRECTORY_PROPERTY
Deprecated.Configurable property for shakemap directory.static java.lang.String
SHAKEMAP_INDEXER_COMMAND_PROPERTY
Deprecated.Configurable property.-
Fields inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
CLEANUP_INTERVAL_PROPERTY, CONCURRENT_PRODUCTS_PROPERTY, DEFAULT_CLEANUP_INTERVAL, DEFAULT_CONCURRENT_PRODUCTS, DEFAULT_PROCESS_DUPLICATES, EXCLUDE_PATHS_PROPERTY, INCLUDE_PATHS_PROPERTY, INDEX_FILE_PROPERTY, NOTIFICATION_INDEX_PROPERTY, PROCESS_DUPLICATES
-
Fields 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 Constructor Description ShakeMapIndexerWedge()
Deprecated.Create a new ShakeMapIndexerWedge.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
configure(Config config)
Deprecated.Configure this shakemap indexer.java.io.File
getEventDirectory(ShakeMap shakemap)
Deprecated.Get the directory for a particular shakemap.void
onProduct(Product product)
Deprecated.Receive a ShakeMap from Product Distribution.int
runIndexer(java.lang.String network, java.lang.String code, boolean delete)
Deprecated.Run the shakemap indexer.java.lang.String
translateShakeMapSource(java.lang.String eventSource)
Deprecated.Translate from an event source to the old style shakemap source.-
Methods inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
cleanup, getCleanupInterval, getConcurrentProducts, getExcludePaths, getIncludePaths, getNotificationIndex, isProcessDuplicates, onAfterProcessNotification, onBeforeProcessNotification, onBeforeProcessProduct, onExpiredNotification, onNotification, setCleanupInterval, setConcurrentProducts, setNotificationIndex, setProcessDuplicates, shutdown, startup
-
Methods 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, setTimeout
-
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.usgs.util.Configurable
getName, setName
-
Methods inherited from interface gov.usgs.earthquake.distribution.NotificationListener
getMaxTries, getTimeout
-
-
-
-
Field Detail
-
SHAKEMAP_INDEXER_COMMAND_PROPERTY
public static final java.lang.String SHAKEMAP_INDEXER_COMMAND_PROPERTY
Deprecated.Configurable property.- See Also:
- Constant Field Values
-
DEFAULT_SHAKEMAP_INDEXER_COMMAND
public static final java.lang.String DEFAULT_SHAKEMAP_INDEXER_COMMAND
Deprecated.The shakemap indexer command to execute.- See Also:
- Constant Field Values
-
COMMAND_TIMEOUT_PROPERTY
public static final java.lang.String COMMAND_TIMEOUT_PROPERTY
Deprecated.Configurable property for command timeout.- See Also:
- Constant Field Values
-
DEFAULT_COMMAND_TIMEOUT
public static final java.lang.String DEFAULT_COMMAND_TIMEOUT
Deprecated.Default command timeout.- See Also:
- Constant Field Values
-
SHAKEMAP_DIRECTORY_PROPERTY
public static final java.lang.String SHAKEMAP_DIRECTORY_PROPERTY
Deprecated.Configurable property for shakemap directory.- See Also:
- Constant Field Values
-
DEFAULT_SHAKEMAP_DIRECTORY
public static final java.lang.String DEFAULT_SHAKEMAP_DIRECTORY
Deprecated.Default shakemap directory.- See Also:
- Constant Field Values
-
-
Method Detail
-
onProduct
public void onProduct(Product product) throws java.lang.Exception
Deprecated.Receive a ShakeMap from Product Distribution.- Overrides:
onProduct
in classDefaultNotificationListener
- Parameters:
product
- a shakemap type product.- Throws:
java.lang.Exception
- if error occurs
-
runIndexer
public int runIndexer(java.lang.String network, java.lang.String code, boolean delete) throws java.lang.Exception
Deprecated.Run the shakemap indexer. If network and code are omitted, all events are updated.- Parameters:
network
- the network to update.code
- the code to update.delete
- whether indexer is handling a delete (true) or update (false).- Returns:
- -1 if indexer does not complete within max(1, getAttemptCount()) times, or exit code if indexer completes.
- Throws:
java.io.IOException
- if IO error occursjava.lang.Exception
-
getEventDirectory
public java.io.File getEventDirectory(ShakeMap shakemap) throws java.lang.Exception
Deprecated.Get the directory for a particular shakemap.- Parameters:
shakemap
- the shakemap to find a directory for.- Returns:
- the shakemap directory.
- Throws:
java.lang.Exception
- if error occurs
-
translateShakeMapSource
public java.lang.String translateShakeMapSource(java.lang.String eventSource)
Deprecated.Translate from an event source to the old style shakemap source. Driven by the SOURCE_TRANSLATION_MAP.- Parameters:
eventSource
- the event network.- Returns:
- the shakemap network.
-
configure
public void configure(Config config) throws java.lang.Exception
Deprecated.Configure this shakemap indexer.- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultNotificationListener
- Parameters:
config
- the Config object with settings.- Throws:
java.lang.Exception
- if configuration exceptions occur.
-
-