@Named
public final class DefaultStatusService
extends java.lang.Object
implements org.springframework.context.SmartLifecycle
Modifier and Type | Class and Description |
---|---|
private static class |
DefaultStatusService.MapUpdateCallback |
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Throwable> |
collectedErrors |
private EventBus |
eventBus |
private ListeningScheduledExecutorService |
executorService |
private NodeIdentityService |
identityService |
private NodeLifecycleService |
lifecycleService |
private static org.slf4j.Logger |
logger |
private java.lang.String |
nodeId |
private java.util.concurrent.atomic.AtomicBoolean |
running |
private IMap<java.lang.String,Status> |
statusMap |
private static @s long |
UPDATE_PERIOD_IN_S |
Constructor and Description |
---|
DefaultStatusService(NodeIdentityService identityService,
NodeLifecycleService lifecycleService,
HazelcastInstance hazelcastInstance,
EventBus eventBus) |
Modifier and Type | Method and Description |
---|---|
int |
getPhase() |
void |
handleServiceFailureEvent(ServiceFailureEvent event) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
private void |
updateMap() |
private static final @s long UPDATE_PERIOD_IN_S
private static final org.slf4j.Logger logger
private final ListeningScheduledExecutorService executorService
private final java.util.concurrent.atomic.AtomicBoolean running
private final java.util.List<java.lang.Throwable> collectedErrors
private final NodeIdentityService identityService
private final NodeLifecycleService lifecycleService
private final EventBus eventBus
private final java.lang.String nodeId
@Inject public DefaultStatusService(NodeIdentityService identityService, NodeLifecycleService lifecycleService, HazelcastInstance hazelcastInstance, EventBus eventBus)
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
private void updateMap()
public void handleServiceFailureEvent(ServiceFailureEvent event)