com.hazelcast.instance
Class DefaultNodeExtension

java.lang.Object
  extended by com.hazelcast.instance.DefaultNodeExtension
All Implemented Interfaces:
NodeExtension

public class DefaultNodeExtension
extends Object
implements NodeExtension


Field Summary
protected  ILogger logger
           
protected  Node node
           
protected  ILogger systemLogger
           
 
Constructor Summary
DefaultNodeExtension()
           
 
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> clazz)
          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()
           
protected  PartitioningStrategy getPartitioningStrategy(ClassLoader configClassLoader)
           
 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 NodeExtension.onThreadStart(Thread).
 void printNodeInfo(Node node)
          Called to print node information during startup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected volatile Node node

logger

protected volatile ILogger logger

systemLogger

protected volatile ILogger systemLogger
Constructor Detail

DefaultNodeExtension

public DefaultNodeExtension()
Method Detail

beforeStart

public void beforeStart(Node node)
Description copied from interface: NodeExtension
Called before node is started

Specified by:
beforeStart in interface NodeExtension

printNodeInfo

public void printNodeInfo(Node node)
Description copied from interface: NodeExtension
Called to print node information during startup

Specified by:
printNodeInfo in interface NodeExtension

afterStart

public void afterStart(Node node)
Description copied from interface: NodeExtension
Called after node is started

Specified by:
afterStart in interface NodeExtension

getSecurityContext

public SecurityContext getSecurityContext()
Description copied from interface: NodeExtension
Returns SecurityContext for this Node if available, otherwise returns null.

Specified by:
getSecurityContext in interface NodeExtension
Returns:
security context

getNativeDataStorage

public Storage<DataRef> getNativeDataStorage()
Specified by:
getNativeDataStorage in interface NodeExtension

createSerializationService

public SerializationService createSerializationService()
Description copied from interface: NodeExtension
Creates a SerializationService instance to be used by this Node.

Specified by:
createSerializationService in interface NodeExtension
Returns:
a SerializationService instance

getPartitioningStrategy

protected PartitioningStrategy getPartitioningStrategy(ClassLoader configClassLoader)
                                                throws Exception
Throws:
Exception

createService

public <T> T createService(Class<T> clazz)
Description copied from interface: NodeExtension
Creates a service which is an implementation of given type parameter.

Specified by:
createService in interface NodeExtension
Parameters:
clazz - type of service
Returns:
service implementation

getMemberSocketInterceptor

public MemberSocketInterceptor getMemberSocketInterceptor()
Description copied from interface: NodeExtension
Returns MemberSocketInterceptor for this Node if available, otherwise returns null.

Specified by:
getMemberSocketInterceptor in interface NodeExtension
Returns:
MemberSocketInterceptor

getSocketChannelWrapperFactory

public SocketChannelWrapperFactory getSocketChannelWrapperFactory()
Description copied from interface: NodeExtension
Returns SocketChannelWrapperFactory instance to be used by this Node.

Specified by:
getSocketChannelWrapperFactory in interface NodeExtension
Returns:
SocketChannelWrapperFactory

createPacketReader

public PacketReader createPacketReader(TcpIpConnection connection,
                                       IOService ioService)
Description copied from interface: NodeExtension
Creates a PacketReader for given Connection instance.

Specified by:
createPacketReader in interface NodeExtension
Parameters:
connection - tcp-ip connection
ioService - IOService
Returns:
packet reader

createPacketWriter

public PacketWriter createPacketWriter(TcpIpConnection connection,
                                       IOService ioService)
Description copied from interface: NodeExtension
Creates a PacketWriter for given Connection instance.

Specified by:
createPacketWriter in interface NodeExtension
Parameters:
connection - tcp-ip connection
ioService - IOService
Returns:
packet writer

onThreadStart

public void onThreadStart(Thread thread)
Description copied from interface: NodeExtension
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.

Specified by:
onThreadStart in interface NodeExtension
Parameters:
thread - thread starting

onThreadStop

public void onThreadStop(Thread thread)
Description copied from interface: NodeExtension
Called before a thread stops to clean/release injected by NodeExtension.onThreadStart(Thread).

Specified by:
onThreadStop in interface NodeExtension
Parameters:
thread - thread stopping

getMemoryStats

public MemoryStats getMemoryStats()
Description copied from interface: NodeExtension
Returns MemoryStats of for the JVM and current HazelcastInstance.

Specified by:
getMemoryStats in interface NodeExtension
Returns:
memory statistics

destroy

public void destroy()
Description copied from interface: NodeExtension
Destroys NodeExtension. Called on Node.shutdown()

Specified by:
destroy in interface NodeExtension


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