public class NodeEngineImpl extends Object implements NodeEngine
OperationServiceImpl
to the outside.Constructor and Description |
---|
NodeEngineImpl(Node node) |
Modifier and Type | Method and Description |
---|---|
ClusterService |
getClusterService()
Gets the ClusterService.
|
Config |
getConfig()
Returns the Config that was used to create the HazelcastInstance.
|
ClassLoader |
getConfigClassLoader()
Returns the Config ClassLoader.
|
ClusterWideConfigurationService |
getConfigurationService() |
Diagnostics |
getDiagnostics() |
InternalEventService |
getEventService()
Gets the EventService.
|
InternalExecutionService |
getExecutionService()
Gets the ExecutionService.
|
HazelcastInstance |
getHazelcastInstance()
Returns the HazelcastInstance that this
NodeEngine belongs to. |
MemberImpl |
getLocalMember()
Returns the local member.
|
ILogger |
getLogger(Class clazz)
Gets the logger for a given class.
|
ILogger |
getLogger(String name)
Gets the logger for a given name.
|
LoggingService |
getLoggingService() |
ManagementCenterService |
getManagementCenterService() |
Address |
getMasterAddress()
Gets the address of the master member.
|
MetricsRegistry |
getMetricsRegistry() |
Node |
getNode() |
OperationParker |
getOperationParker() |
InternalOperationService |
getOperationService()
Gets the OperationService.
|
PacketHandler |
getPacketDispatcher() |
InternalPartitionService |
getPartitionService()
Gets the IPartitionService.
|
Operation[] |
getPostJoinOperations()
Collects all post-join operations from
PostJoinAwareService s. |
Operation[] |
getPreJoinOperations() |
HazelcastProperties |
getProperties()
Returns the HazelcastProperties.
|
InternalProxyService |
getProxyService()
Gets the ProxyService.
|
QuorumServiceImpl |
getQuorumService()
Gets the QuorumService.
|
SerializationService |
getSerializationService()
Gets the SerializationService.
|
<T> T |
getService(String serviceName)
Gets the service with the given name.
|
Collection<ServiceInfo> |
getServiceInfos(Class serviceClass) |
ServiceManager |
getServiceManager() |
<S> Collection<S> |
getServices(Class<S> serviceClass)
Returns a list of services matching provides service class/interface.
|
<T extends SharedService> |
getSharedService(String serviceName)
Gets the
SharedService for the given serviceName. |
Address |
getThisAddress()
Get the address of this member.
|
TransactionManagerService |
getTransactionManagerService()
Gets the TransactionManagerService.
|
MemberVersion |
getVersion()
Returns the codebase version of the node.
|
WanReplicationService |
getWanReplicationService()
Gets the WanReplicationService.
|
boolean |
isActive()
Checks if the HazelcastInstance that this
NodeEngine belongs to is still active. |
boolean |
isRunning()
Indicates that node is not shutting down or it has not already shut down
|
void |
onClientDisconnected(String clientUuid) |
void |
onMemberLeft(MemberImpl member) |
void |
onPartitionMigrate(MigrationInfo migrationInfo) |
void |
reset() |
void |
shutdown(boolean terminate) |
void |
start() |
Data |
toData(Object object)
Serializes an object to a
Data . |
Object |
toObject(Object object)
Deserializes an object.
|
<T> T |
toObject(Object object,
Class klazz)
Deserializes an object.
|
public NodeEngineImpl(Node node)
public LoggingService getLoggingService()
public MetricsRegistry getMetricsRegistry()
public PacketHandler getPacketDispatcher()
public void start()
public Diagnostics getDiagnostics()
public ClusterWideConfigurationService getConfigurationService()
public ServiceManager getServiceManager()
public Address getThisAddress()
NodeEngine
getThisAddress
in interface NodeEngine
public Address getMasterAddress()
NodeEngine
getMasterAddress
in interface NodeEngine
public MemberImpl getLocalMember()
NodeEngine
getLocalMember
in interface NodeEngine
public Config getConfig()
NodeEngine
getConfig
in interface NodeEngine
public ClassLoader getConfigClassLoader()
NodeEngine
getConfigClassLoader
in interface NodeEngine
public InternalEventService getEventService()
NodeEngine
getEventService
in interface NodeEngine
public SerializationService getSerializationService()
NodeEngine
getSerializationService
in interface NodeEngine
public InternalOperationService getOperationService()
NodeEngine
getOperationService
in interface NodeEngine
public InternalExecutionService getExecutionService()
NodeEngine
getExecutionService
in interface NodeEngine
public InternalPartitionService getPartitionService()
NodeEngine
getPartitionService
in interface NodeEngine
public ClusterService getClusterService()
NodeEngine
getClusterService
in interface NodeEngine
public ManagementCenterService getManagementCenterService()
public InternalProxyService getProxyService()
NodeEngine
getProxyService
in interface NodeEngine
public OperationParker getOperationParker()
public WanReplicationService getWanReplicationService()
NodeEngine
getWanReplicationService
in interface NodeEngine
public QuorumServiceImpl getQuorumService()
NodeEngine
getQuorumService
in interface NodeEngine
public TransactionManagerService getTransactionManagerService()
NodeEngine
getTransactionManagerService
in interface NodeEngine
public Data toData(Object object)
NodeEngine
Data
.
This method can safely be called with a Data
instance. In that case, that instance is returned.
If this method is called with null, null is returned.toData
in interface NodeEngine
object
- the object to serialize.public Object toObject(Object object)
NodeEngine
toObject
in interface NodeEngine
object
- the object to deserialize.public <T> T toObject(Object object, Class klazz)
NodeEngine
toObject
in interface NodeEngine
object
- the object to deserialize.klazz
- The class to instantiate when deserializing the object.public boolean isActive()
NodeEngine
NodeEngine
belongs to is still active.
A HazelcastInstance is not active when it is shutting down or already shut down.
* Also see NodeEngine.isRunning()
isActive
in interface NodeEngine
public boolean isRunning()
NodeEngine
isRunning
in interface NodeEngine
public HazelcastInstance getHazelcastInstance()
NodeEngine
NodeEngine
belongs to.getHazelcastInstance
in interface NodeEngine
public ILogger getLogger(String name)
NodeEngine
getLogger
in interface NodeEngine
name
- the name of the logger.NodeEngine.getLogger(Class)
public ILogger getLogger(Class clazz)
NodeEngine
getLogger
in interface NodeEngine
clazz
- the class of the logger.NodeEngine.getLogger(String)
public HazelcastProperties getProperties()
NodeEngine
getProperties
in interface NodeEngine
public <T> T getService(String serviceName)
NodeEngine
getService
in interface NodeEngine
T
- the type of the service.serviceName
- the name of the servicepublic <T extends SharedService> T getSharedService(String serviceName)
NodeEngine
SharedService
for the given serviceName.getSharedService
in interface NodeEngine
serviceName
- the name of the shared service to get.public MemberVersion getVersion()
NodeEngine
Version.of(3,8,0)
. A node's codebase version may be different than cluster version.getVersion
in interface NodeEngine
Cluster.getClusterVersion()
public <S> Collection<S> getServices(Class<S> serviceClass)
public Collection<ServiceInfo> getServiceInfos(Class serviceClass)
public Node getNode()
public void onMemberLeft(MemberImpl member)
public void onClientDisconnected(String clientUuid)
public void onPartitionMigrate(MigrationInfo migrationInfo)
public Operation[] getPostJoinOperations()
PostJoinAwareService
s.
Post join operations should return response, at least a null
response.
NOTE: Post join operations must be lock free, meaning no locks at all:
no partition locks, no key-based locks, no service level locks, no database interaction!
The Operation.getPartitionId()
method should return a negative value.
This means that the operations should not implement PartitionAwareOperation
.
public Operation[] getPreJoinOperations()
public void reset()
public void shutdown(boolean terminate)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.