@Named public final class DefaultNodeIdentityService extends java.lang.Object implements NodeIdentityService
Modifier and Type | Field and Description |
---|---|
private org.springframework.context.ApplicationContext |
applicationContext |
private java.lang.String |
encodedNodeId |
private static org.slf4j.Logger |
log |
private java.util.UUID |
nodeId |
private NodeType |
nodeType |
private static ImmutableSet<java.lang.String> |
SERVICES_NAMES |
Constructor and Description |
---|
DefaultNodeIdentityService(HazelcastInstance hazelcastInstance,
org.springframework.context.ApplicationContext applicationContext) |
Modifier and Type | Method and Description |
---|---|
private void |
construct() |
NodeDescriptor |
descriptor()
Returns the descriptor for the node that contains cached, serializable information from the service.
|
boolean |
is(NodeType type)
Checks whether node has a given type.
|
boolean |
isCompute()
Tells whether the node is compute node.
|
java.lang.String |
nodeId()
Returns the stringified ID of the node.
|
java.util.Set<java.lang.String> |
services()
Returns the set of running services.
|
private static final org.slf4j.Logger log
private static final ImmutableSet<java.lang.String> SERVICES_NAMES
private final java.util.UUID nodeId
private final java.lang.String encodedNodeId
private NodeType nodeType
private final org.springframework.context.ApplicationContext applicationContext
@Inject public DefaultNodeIdentityService(HazelcastInstance hazelcastInstance, org.springframework.context.ApplicationContext applicationContext)
@PostConstruct private void construct()
public java.lang.String nodeId()
NodeIdentityService
Returns the stringified ID of the node.
nodeId
in interface NodeIdentityService
public NodeDescriptor descriptor()
NodeIdentityService
Returns the descriptor for the node that contains cached, serializable information from the service.
descriptor
in interface NodeIdentityService
public java.util.Set<java.lang.String> services()
NodeIdentityService
Returns the set of running services.
services
in interface NodeIdentityService
public boolean isCompute()
NodeIdentityService
Tells whether the node is compute node.
isCompute
in interface NodeIdentityService
public boolean is(NodeType type)
NodeIdentityService
Checks whether node has a given type.
is
in interface NodeIdentityService
type
- a type to check.