com.hazelcast.instance
Interface NodeExtension

All Known Implementing Classes:
DefaultNodeExtension

public interface NodeExtension

NodeExtension is a Node extension mechanism to be able to plug different implementations of some modules, like; SerializationService, SocketChannelWrapperFactory etc.


Method Summary
 void afterStart(Node node)
          Called after node is started
 void beforeStart(Node node)
          Called before node is started
 PacketReader createPacketReader(TcpIpConnection connection, IOService ioService)
          Creates a PacketReader for given Connection instance.
 PacketWriter createPacketWriter(TcpIpConnection connection, IOService ioService)
          Creates a PacketWriter for given Connection instance.
 SerializationService createSerializationService()
          Creates a SerializationService instance to be used by this Node.
<T> T
createService(Class<T> type)
          Creates a service which is an implementation of given type parameter.
 void destroy()
          Destroys NodeExtension.
 MemberSocketInterceptor getMemberSocketInterceptor()
          Returns MemberSocketInterceptor for this Node if available, otherwise returns null.
 MemoryStats getMemoryStats()
          Returns MemoryStats of for the JVM and current HazelcastInstance.
 Storage<DataRef> getNativeDataStorage()
          Deprecated.  
 SecurityContext getSecurityContext()
          Returns SecurityContext for this Node if available, otherwise returns null.
 SocketChannelWrapperFactory getSocketChannelWrapperFactory()
          Returns SocketChannelWrapperFactory instance to be used by this Node.
 void onThreadStart(Thread thread)
          Called on thread start to inject/intercept extension specific logic, like; registering thread in some service, executing a special method before thread starts to do its own task.
 void onThreadStop(Thread thread)
          Called before a thread stops to clean/release injected by onThreadStart(Thread).
 void printNodeInfo(Node node)
          Called to print node information during startup
 

Method Detail

beforeStart

void beforeStart(Node node)
Called before node is started


printNodeInfo

void printNodeInfo(Node node)
Called to print node information during startup


afterStart

void afterStart(Node node)
Called after node is started


createSerializationService

SerializationService createSerializationService()
Creates a SerializationService instance to be used by this Node.

Returns:
a SerializationService instance

getSecurityContext

SecurityContext getSecurityContext()
Returns SecurityContext for this Node if available, otherwise returns null.

Returns:
security context

getNativeDataStorage

@Deprecated
Storage<DataRef> getNativeDataStorage()
Deprecated. 


createService

<T> T createService(Class<T> type)
Creates a service which is an implementation of given type parameter.

Parameters:
type - type of service
Returns:
service implementation
Throws:
IllegalArgumentException - if type is not known

getMemberSocketInterceptor

MemberSocketInterceptor getMemberSocketInterceptor()
Returns MemberSocketInterceptor for this Node if available, otherwise returns null.

Returns:
MemberSocketInterceptor

getSocketChannelWrapperFactory

SocketChannelWrapperFactory getSocketChannelWrapperFactory()
Returns SocketChannelWrapperFactory instance to be used by this Node.

Returns:
SocketChannelWrapperFactory

createPacketReader

PacketReader createPacketReader(TcpIpConnection connection,
                                IOService ioService)
Creates a PacketReader for given Connection instance.

Parameters:
connection - tcp-ip connection
ioService - IOService
Returns:
packet reader

createPacketWriter

PacketWriter createPacketWriter(TcpIpConnection connection,
                                IOService ioService)
Creates a PacketWriter for given Connection instance.

Parameters:
connection - tcp-ip connection
ioService - IOService
Returns:
packet writer

onThreadStart

void onThreadStart(Thread thread)
Called on thread start to inject/intercept extension specific logic, like; registering thread in some service, executing a special method before thread starts to do its own task.

Parameters:
thread - thread starting

onThreadStop

void onThreadStop(Thread thread)
Called before a thread stops to clean/release injected by onThreadStart(Thread).

Parameters:
thread - thread stopping

getMemoryStats

MemoryStats getMemoryStats()
Returns MemoryStats of for the JVM and current HazelcastInstance.

Returns:
memory statistics

destroy

void destroy()
Destroys NodeExtension. Called on Node.shutdown()



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