public final class ClockServiceAppImpl extends MetadataServiceAppImpl implements ServiceThread.Target
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
Name of the default 'Origin'.
|
static String |
GENERATED_TRACES
Traces subdirectory.
|
static String |
MIDNIGHT_ENABLED_PROPERTY
Enables the generation of 'Midnight' events.
|
static String |
NAME_PROPERTY
Identifies the 'Origin' entry in the Metadata associated with the
service instance.
|
SERVICE_APP_PROPERTIES| Constructor and Description |
|---|
ClockServiceAppImpl() |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getEntityName()
Gets the entity name.
|
boolean |
onEvent(Event event)
Called when a event has been received.
|
boolean |
onNewMetadata(Metadata metadata)
Called on new metadata.
|
void |
onServicesNotReady()
Called when some services are not ready.
|
void |
run()
Runs.
|
boolean |
setUp(MetadataService service)
Sets up the application.
|
void |
start()
Starts the application.
|
void |
stop()
Stops the application.
|
void |
tearDown()
Tears down the application.
|
getMetadata, getService, loadMetadata, setUpcreateStats, fail, getConfig, getConfigProperties, getDataDir, getJoinTimeout, getProperties, getSourceUUID, getThisLogger, getTimer, onAlert, onServiceNotAvailableException, onServicesReady, onSignalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateStats, onAlert, onServicesReady, onSignalpublic static final String DEFAULT_NAME
public static final String GENERATED_TRACES
public static final String MIDNIGHT_ENABLED_PROPERTY
public static final String NAME_PROPERTY
public Optional<String> getEntityName()
getEntityName in interface MetadataServiceAppgetEntityName in class MetadataServiceAppImplpublic boolean onEvent(Event event)
Caution: this is called while synchronized on the service.
onEvent in interface ServiceApponEvent in class ServiceAppImplevent - The event.public boolean onNewMetadata(Metadata metadata)
Overidden as needed.
Called by the framework and by overriding classes at the end of the override.
onNewMetadata in interface MetadataServiceApponNewMetadata in class MetadataServiceAppImplmetadata - The new metadata.public void onServicesNotReady()
This is called by the pending actions processing when it not known if all registered services are ready. This may be used by a service thread to trigger some state refresh when the pending actions processing is completed; at that time, all the registered services will be ready.
onServicesNotReady in interface ServiceApponServicesNotReady in class ServiceAppImplpublic void run()
throws InterruptedException
Similar to same in Runnable but may throw exceptions.
run in interface ServiceThread.TargetInterruptedExceptionpublic boolean setUp(MetadataService service)
Overidden as needed.
Called by the framework and by overriding classes at the beginning of the override.
setUp in interface MetadataServiceAppsetUp in class MetadataServiceAppImplservice - The service holding this application.public void start()
Overidden as needed by the application.
Called by the framework.
Should return only when the application is started.
start in interface ServiceAppstart in class ServiceAppImplpublic void stop()
Overidden as needed by the application.
Called by the framework.
stop in interface ServiceAppstop in class ServiceAppImplpublic void tearDown()
Overidden as needed by the application.
Called by the framework and by overriding classes at the end of the override.
tearDown in interface ServiceApptearDown in class ServiceAppImplCopyright © 2003-2019 Serge Brisson. All Rights Reserved.