@ThreadSafe public abstract class MetadataServiceImpl extends ServiceImpl implements MetadataService
DEFAULT_JOIN_TIMEOUT, DEFAULT_RESTART_DELAY, DEFAULT_STARTING_EXTEND, DEFAULT_STOPPING_EXTEND, DEPENDENCY_PROPERTY, JOIN_TIMEOUT_PROPERTY, MEMORY_LOG_INTERVAL_PROPERTY, MONITOR_DISABLED_PROPERTY, RESTART_ALLOWED_PROPERTY, RESTART_DELAY_PROPERTY, RESTART_IGNORED_PROPERTY, SERVICE_LOG_ID_PROPERTY, SERVICE_UUID_PROPERTY, STARTING_EXTEND_PROPERTY, STARTUP_DELAY_PROPERTY, STATS_LOG_ENABLED_PROPERTY, STOPPING_EXTEND_PROPERTY, ZOMBIE_ENABLED_PROPERTYREFRESH_METADATA_SIGNALMIDNIGHT_EVENT, PING_SIGNAL, PONG_EVENT, RESTART_NOW_SIGNAL, RESTART_SIGNAL, RESUME_SIGNAL, RESUMED_EVENT, STARTED_EVENT, STOP_NOW_SIGNAL, STOP_SIGNAL, STOPPED_EVENT, SUSPEND_SIGNAL, SUSPENDED_EVENT, WATCHDOG_EVENT, ZOMBIE_EVENT| Constructor and Description |
|---|
MetadataServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Metadata |
getMetadata()
Gets the service metadata.
|
boolean |
hasMetadata()
Asks if the service has metadata.
|
boolean |
loadMetadata(MetadataFilter filter)
Loads the metadata.
|
void |
monitorStores()
Monitors stores.
|
protected boolean |
onNewMetadata(Metadata metadata)
Called on new metadata.
|
protected boolean |
onSignal(Signal signal)
Called when a signal has been received.
|
boolean |
reloadMetadata()
Reloads the metadata.
|
void |
resetPointsStore()
Resets the association of the points to their store.
|
protected void |
tearDown()
Tears down what has been set up.
|
protected void |
tearDownConfig()
Tears down the config.
|
addAlertListener, cancelRestarters, createStats, disableSuspend, doPendingActions, doRun, doStart, doStop, enableSuspend, exportAgent, fail, getAlerter, getConfig, getDataDir, getEntityName, getJoinTimeout, getMutex, getOptionalSourceUUID, getServiceActivator, getServiceUUID, getSourceUUID, isJMXRegistrationEnabled, isRunning, isStarted, isStopped, isStopping, isWait, isZombie, monitorService, onAlert, onEvent, onServicesNotReady, onServiceStartFailure, registerServer, removeAlertListener, restart, restoreConfigState, restoreMonitored, resume, run, saveConfigState, saveMonitored, sendAlert, sendEvent, sendSignal, setRestartEnabled, setRestartSignaled, setSourceUUID, setUp, starting, stopping, suspend, trySuspend, unregisterServeraddStats, closeSnoozeAlarm, getLogID, getServiceActivatorBase, getServiceName, getStats, getThisLogger, getThread, getTimer, getVersion, interrupt, isCurrentThread, isThreadStarted, join, logStats, scheduleMidnightLogger, setLogID, setServiceActivatorBase, setServiceName, snooze, starting, startThread, startTimer, stopping, stopTimer, toString, uncaughtException, updateStats, wakeUpclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAlertListener, disableSuspend, enableSuspend, exportAgent, getAlerter, getConfig, getDataDir, getEntityName, getJoinTimeout, getOptionalSourceUUID, getServiceActivator, getServiceUUID, getSourceUUID, isRunning, isStarted, isStopped, isStopping, isWait, isZombie, monitorService, registerServer, removeAlertListener, restart, restoreConfigState, restoreMonitored, resume, saveConfigState, saveMonitored, sendAlert, sendEvent, sendSignal, setRestartEnabled, setSourceUUID, starting, stopping, suspend, trySuspend, unregisterServeraddStats, fail, getServiceName, getStats, getTimer, isJMXRegistrationEnabled, snooze, starting, stopping, wakeUppublic final Metadata getMetadata()
Promoted to public access to help the service tests.
getMetadata in interface MetadataService@CheckReturnValue public final boolean hasMetadata()
public final boolean loadMetadata(MetadataFilter filter)
loadMetadata in interface MetadataServicefilter - The metadata filter.public final void monitorStores()
monitorStores in interface MetadataServicepublic final boolean reloadMetadata()
reloadMetadata in interface MetadataServicepublic final void resetPointsStore()
throws ServiceNotAvailableException
resetPointsStore in interface MetadataServiceServiceNotAvailableException - When the service is not available.@CheckReturnValue
protected boolean onNewMetadata(@Nonnull
Metadata metadata)
metadata - The new metadata.protected boolean onSignal(Signal signal)
Caution: this is called while synchronized on mutex.
onSignal in class ServiceImplsignal - The signal.protected void tearDown()
tearDown in class ServiceImplprotected void tearDownConfig()
tearDownConfig in class ServiceImplCopyright © 2003-2019 Serge Brisson. All Rights Reserved.