| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractHeartImpl.HeartbeatTask |
| Modifier and Type | Field and Description |
|---|---|
protected static long |
DEFAULT_TIMER_DELAY_MS |
protected static long |
DEFAULT_TIMER_PERIOD_MS |
static Object |
SERVICE_INSTANCE_ID_FLAG_GENERATE_UUID |
protected String |
serviceInstanceId |
protected String |
serviceType |
protected Timer |
timer |
protected long |
timerPeriodMs |
| Constructor and Description |
|---|
AbstractHeartImpl() |
| Modifier and Type | Method and Description |
|---|---|
Heartbeat |
beat()
Returns a single
Heartbeat object without sending
via messaging |
protected abstract Map<String,String> |
gatherDetails()
Gathers any useful health metrics for the details section of
each heartbeat messages.
|
protected abstract void |
send(Heartbeat heartbeat)
Sends the given heartbeat message
|
void |
setServiceInstanceId(String serviceInstanceId)
Sets the service instance ID to be used for
Heartbeat messages. |
void |
setServiceType(String serviceType)
Sets the service type to be used for
Heartbeat messages. |
void |
setTimerPeriodMs(long timerPeriodMs)
The period of heartbeat messages
|
void |
start()
Starts the repeated sending of
Heartbeat messages
for health monitoring |
void |
stop()
Stops the repeated sending of
Heartbeat messages
for health monitoring |
public static final Object SERVICE_INSTANCE_ID_FLAG_GENERATE_UUID
protected static final long DEFAULT_TIMER_DELAY_MS
protected static final long DEFAULT_TIMER_PERIOD_MS
protected String serviceType
protected String serviceInstanceId
protected Timer timer
protected long timerPeriodMs
public void setServiceType(String serviceType)
Heartbeat messages.serviceType - public void setServiceInstanceId(String serviceInstanceId)
Heartbeat messages.serviceInstanceId - public void setTimerPeriodMs(long timerPeriodMs)
timerPeriodMs - public void start()
HeartHeartbeat messages
for health monitoringpublic void stop()
HeartHeartbeat messages
for health monitoringpublic Heartbeat beat()
HeartHeartbeat object without sending
via messagingprotected abstract Map<String,String> gatherDetails()
protected abstract void send(Heartbeat heartbeat)
heartbeat - Copyright © 2017 Alfresco Software. All rights reserved.