com.hazelcast.spi
Interface NodeEngine

All Known Implementing Classes:
NodeEngineImpl

public interface NodeEngine

The NodeEngine is the 'umbrella' of services/service-method that gets injected into a ManagedService.

So if you are writing a custom SPI service, such as a stack-service, this service should probably implement the ManagedService so you can get access to the services within the system.


Method Summary
 ClusterService getClusterService()
          Gets the ClusterService.
 Config getConfig()
          Returns the Config that was used to create the HazelcastInstance.
 ClassLoader getConfigClassLoader()
          Returns the Config ClassLoader.
 EventService getEventService()
          Gets the EventService.
 ExecutionService getExecutionService()
          Gets the ExecutionService.
 GroupProperties getGroupProperties()
          Returns the GroupProperties.
 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.
 Address getMasterAddress()
          Gets the address of the master member.
 Storage<DataRef> getOffHeapStorage()
          Returns the offheap Storage.
 OperationService getOperationService()
          Gets the OperationService.
 InternalPartitionService getPartitionService()
          Gets the InternalPartitionService.
 ProxyService getProxyService()
          Gets the ProxyService.
 QuorumServiceImpl getQuorumService()
           
 SerializationService getSerializationService()
          Gets the SerializationService.
<T extends SharedService>
T
getSharedService(String serviceName)
          Gets the SharedService for the given serviceName.
 Address getThisAddress()
          Get the address of this member.
 TransactionManagerService getTransactionManagerService()
          Gets the TransactionManagerService.
 WaitNotifyService getWaitNotifyService()
          Gets the WaitNotifyService.
 WanReplicationService getWanReplicationService()
          Gets the WanReplicationService.
 boolean isActive()
          Checks if the HazelcastInstance that this NodeEngine belongs to is still active.
 Data toData(Object object)
          Serializes an object to a Data.
<T> T
toObject(Object object)
          Deserializes an object.
 

Method Detail

getOperationService

OperationService getOperationService()
Gets the OperationService.

Returns:
the OperationService.

getExecutionService

ExecutionService getExecutionService()
Gets the ExecutionService.

Returns:
the ExecutionService.

getClusterService

ClusterService getClusterService()
Gets the ClusterService.

Returns:
the ClusterService.

getPartitionService

InternalPartitionService getPartitionService()
Gets the InternalPartitionService.

Returns:
the InternalPartitionService.

getEventService

EventService getEventService()
Gets the EventService.

Returns:
the EventService.

getSerializationService

SerializationService getSerializationService()
Gets the SerializationService.

Returns:
the SerializationService.

getProxyService

ProxyService getProxyService()
Gets the ProxyService.

Returns:
the ProxyService.

getWaitNotifyService

WaitNotifyService getWaitNotifyService()
Gets the WaitNotifyService.

Returns:
the WaitNotifyService.

getWanReplicationService

WanReplicationService getWanReplicationService()
Gets the WanReplicationService.

Returns:
the WanReplicationService.

getQuorumService

QuorumServiceImpl getQuorumService()

getTransactionManagerService

TransactionManagerService getTransactionManagerService()
Gets the TransactionManagerService.

Returns:
the TransactionManagerService.

getMasterAddress

Address getMasterAddress()
Gets the address of the master member.

This value can be null if no master is elected yet.

The value can change over time.

Returns:
the address of the master member.

getThisAddress

Address getThisAddress()
Get the address of this member.

The returned value will never change and will never be null.

Returns:
the address of this member.

getLocalMember

MemberImpl getLocalMember()
Returns the local member.

The returned value will never change and will never be null.

Returns:
the local member.

getConfig

Config getConfig()
Returns the Config that was used to create the HazelcastInstance.

The returned value will never change and will never be null.

Returns:
the config.

getConfigClassLoader

ClassLoader getConfigClassLoader()
Returns the Config ClassLoader.

todo: add more documentation what the purpose is of the config classloader.

Returns:
the config ClassLoader.

getGroupProperties

GroupProperties getGroupProperties()
Returns the GroupProperties.

The returned value will never change and will never be null.

Returns:
the GroupProperties

getLogger

ILogger getLogger(String name)
Gets the logger for a given name.

It is best to get an ILogger through this method instead of doing

Parameters:
name - the name of the logger.
Returns:
the ILogger.
Throws:
NullPointerException - if name is null.
See Also:
getLogger(Class)

getLogger

ILogger getLogger(Class clazz)
Gets the logger for a given class.

Parameters:
clazz - the class of the logger.
Returns:
the ILogger.
Throws:
NullPointerException - if clazz is null.
See Also:
getLogger(String)

toData

Data toData(Object object)
Serializes an object to a 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.

Parameters:
object - the object to serialize.
Returns:
the serialized object.
Throws:
HazelcastSerializationException - when serialization fails.

toObject

<T> T toObject(Object object)
Deserializes an object.

This method can safely be called on an object that is already deserialized. In that case, that instance is returned.

If this method is called with null, null is returned.

Parameters:
object - the object to deserialize.
Returns:
the deserialized object.
Throws:
HazelcastSerializationException - when deserialization fails.

isActive

boolean isActive()
Checks if the HazelcastInstance that this NodeEngine belongs to is still active.

A HazelcastInstance is not active when it is shut down.

Returns:
true if active, false otherwise.

getHazelcastInstance

HazelcastInstance getHazelcastInstance()
Returns the HazelcastInstance that this NodeEngine belongs to.

Returns:
the HazelcastInstance

getSharedService

<T extends SharedService> T getSharedService(String serviceName)
Gets the SharedService for the given serviceName.

Type Parameters:
T -
Parameters:
serviceName - the name of the shared service to get.
Returns:
the found service, or null if the service was not found.
Throws:
NullPointerException - if the serviceName is null.

getOffHeapStorage

Storage<DataRef> getOffHeapStorage()
Returns the offheap Storage.

Returns:
the offheap storage.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.