@PrivateApi public interface NodeExtension
Modifier and Type | Method and Description |
---|---|
void |
afterStart()
Called after node is started
|
void |
beforeJoin()
Called before node attempts to join to the cluster
|
void |
beforeShutdown()
Called before Node.shutdown()
|
void |
beforeStart()
Called before node is started
|
com.hazelcast.internal.dynamicconfig.DynamicConfigListener |
createDynamicConfigListener()
Creates a listener for changes in dynamic data structure configurations
|
Map<String,Object> |
createExtensionServices()
Creates additional extension services, which will be registered by
service manager during start-up.
|
com.hazelcast.internal.networking.ChannelInboundHandler |
createInboundHandler(TcpIpConnection connection,
IOService ioService)
Creates a ChannelInboundHandler for given Connection instance.
|
String |
createMemberUuid(Address address)
Creates a UUID for local member
|
ByteArrayProcessor |
createMulticastInputProcessor(IOService ioService)
Returns a byte array processor for incoming data on the Multicast joiner
|
ByteArrayProcessor |
createMulticastOutputProcessor(IOService ioService)
Returns a byte array processor for outgoing data on the Multicast joiner
|
com.hazelcast.internal.networking.ChannelOutboundHandler |
createOutboundHandler(TcpIpConnection connection,
IOService ioService)
Creates a ChannelOutboundHandler for given Connection instance.
|
com.hazelcast.internal.serialization.InternalSerializationService |
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.
|
com.hazelcast.internal.management.TimedMemberStateFactory |
createTimedMemberStateFactory(HazelcastInstanceImpl instance)
Creates a TimedMemberStateFactory for a given Hazelcast instance
|
com.hazelcast.internal.networking.ChannelFactory |
getChannelFactory()
Returns ChannelFactory instance to be used by this Node.
|
HotRestartService |
getHotRestartService()
Returns the public hot restart service
|
InternalHotRestartService |
getInternalHotRestartService()
Returns the internal hot restart service
|
com.hazelcast.internal.management.ManagementCenterConnectionFactory |
getManagementCenterConnectionFactory() |
MemberSocketInterceptor |
getMemberSocketInterceptor()
Returns MemberSocketInterceptor for this Node if available,
otherwise returns null.
|
MemoryStats |
getMemoryStats()
Returns MemoryStats of for the JVM and current HazelcastInstance.
|
SecurityContext |
getSecurityContext()
Returns SecurityContext for this Node if available, otherwise returns null.
|
SecurityService |
getSecurityService() |
boolean |
isNodeVersionCompatibleWith(Version clusterVersion)
Check if this node's codebase version is compatible with given cluster version.
|
boolean |
isStartCompleted()
Returns true if the instance has started
|
void |
onClusterStateChange(ClusterState newState,
boolean isTransient)
Called when cluster state is changed
|
void |
onClusterVersionChange(Version newVersion)
Called after cluster version is changed.
|
void |
onMemberListChange()
Called synchronously when member list changes
|
void |
onPartitionStateChange()
Called synchronously when partition state (partition assignments, version etc) changes
|
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()
Called to print node information during startup
|
boolean |
registerListener(Object listener)
Registers given listener if it's a known type.
|
void |
registerPlugins(com.hazelcast.internal.diagnostics.Diagnostics diagnostics)
Register the node extension specific diagnostics plugins on the provided
diagnostics . |
void |
shutdown()
Shutdowns NodeExtension.
|
void |
validateJoinRequest(com.hazelcast.internal.cluster.impl.JoinMessage joinMessage)
Executed on the master node before allowing a new member to join from
ClusterJoinManager.handleJoinRequest(JoinRequest, Connection) . |
void beforeStart()
void printNodeInfo()
void beforeJoin()
void afterStart()
boolean isStartCompleted()
void beforeShutdown()
void shutdown()
com.hazelcast.internal.serialization.InternalSerializationService createSerializationService()
SecurityService getSecurityService()
SecurityContext getSecurityContext()
<T> T createService(Class<T> type)
type
- type of serviceIllegalArgumentException
- if type is not knownMap<String,Object> createExtensionServices()
MemberSocketInterceptor getMemberSocketInterceptor()
com.hazelcast.internal.networking.ChannelFactory getChannelFactory()
com.hazelcast.internal.networking.ChannelInboundHandler createInboundHandler(TcpIpConnection connection, IOService ioService)
connection
- tcp-ip connectionioService
- IOServicecom.hazelcast.internal.networking.ChannelOutboundHandler createOutboundHandler(TcpIpConnection connection, IOService ioService)
connection
- tcp-ip connectionioService
- IOServicevoid onThreadStart(Thread thread)
thread
- thread startingvoid onThreadStop(Thread thread)
onThreadStart(Thread)
.thread
- thread stoppingMemoryStats getMemoryStats()
void validateJoinRequest(com.hazelcast.internal.cluster.impl.JoinMessage joinMessage)
ClusterJoinManager.handleJoinRequest(JoinRequest, Connection)
.
Implementation should check if the JoinMessage
should be allowed to proceed, otherwise throw an exception
with a message explaining rejection reason.void onClusterStateChange(ClusterState newState, boolean isTransient)
newState
- new stateisTransient
- status of the change. A cluster state change may be transient if it has been done temporarily
during system operations such cluster start etc.void onPartitionStateChange()
void onMemberListChange()
void onClusterVersionChange(Version newVersion)
newVersion
- the new version at which the cluster operates.boolean isNodeVersionCompatibleWith(Version clusterVersion)
clusterVersion
- the cluster version to check againsttrue
if compatible, otherwise false.boolean registerListener(Object listener)
listener
- listener instanceHotRestartService getHotRestartService()
InternalHotRestartService getInternalHotRestartService()
String createMemberUuid(Address address)
address
- address of local membercom.hazelcast.internal.management.TimedMemberStateFactory createTimedMemberStateFactory(HazelcastInstanceImpl instance)
instance
- The instance to associate with the timed member state factoryTimedMemberStateFactory
com.hazelcast.internal.management.ManagementCenterConnectionFactory getManagementCenterConnectionFactory()
ByteArrayProcessor createMulticastInputProcessor(IOService ioService)
ByteArrayProcessor createMulticastOutputProcessor(IOService ioService)
com.hazelcast.internal.dynamicconfig.DynamicConfigListener createDynamicConfigListener()
void registerPlugins(com.hazelcast.internal.diagnostics.Diagnostics diagnostics)
diagnostics
.diagnostics
- the diagnostics on which plugins should be registeredCopyright © 2018 Hazelcast, Inc.. All rights reserved.