Package io.hekate.core.service
Interface InitializationContext
-
public interface InitializationContext
Context forInitializingService
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClusterContext
cluster()
Returns cluster context.Hekate
hekate()
Returns theHekate
instance that this service belongs to.ClusterNode
localNode()
Returns the cluster node.io.micrometer.core.instrument.MeterRegistry
metrics()
Returns metrics registry.void
rejoin()
Instructs local node to asynchronously terminate and rejoin to the cluster.Hekate.State
state()
Returns the current state ofHekate
instance that this service belongs to.void
terminate()
Triggers asynchronoustermination
of the local node.void
terminate(Throwable e)
Triggers asynchronoustermination
of the local node with the specified error..
-
-
-
Method Detail
-
state
Hekate.State state()
Returns the current state ofHekate
instance that this service belongs to.- Returns:
- State.
-
cluster
ClusterContext cluster()
Returns cluster context.- Returns:
- Cluster context.
-
localNode
ClusterNode localNode()
Returns the cluster node.- Returns:
- Cluster node.
-
hekate
Hekate hekate()
Returns theHekate
instance that this service belongs to.- Returns:
Hekate
instance that this service belongs to.
-
rejoin
void rejoin()
Instructs local node to asynchronously terminate and rejoin to the cluster.
-
terminate
void terminate()
Triggers asynchronoustermination
of the local node.
-
terminate
void terminate(Throwable e)
Triggers asynchronoustermination
of the local node with the specified error..- Parameters:
e
- Cause of termination.
-
metrics
io.micrometer.core.instrument.MeterRegistry metrics()
Returns metrics registry.- Returns:
- Metrics registry.
-
-