@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
|
Map<String,Object> |
createExtensionServices()
Creates additional extension services, which will be registered by
service manager during start-up.
|
String |
createMemberUuid(Address address)
Creates a UUID for local member
|
ReadHandler |
createReadHandler(TcpIpConnection connection,
IOService ioService)
Creates a ReadHandler for given Connection instance.
|
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.
|
WriteHandler |
createWriteHandler(TcpIpConnection connection,
IOService ioService)
Creates a WriteHandler for given Connection instance.
|
ClusterHotRestartStatusDTO |
getCurrentClusterHotRestartStatus()
Returns latest Hot Restart status as Management Center DTO.
|
Set<String> |
getExcludedMemberUuids()
Returns uuids of the members that have been excluded during the cluster start.
|
HotRestartService |
getHotRestartBackupService()
Returns the hot restart data backup service or null if Hot Restart backup is not available (not EE) or not enabled
|
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.
|
SocketChannelWrapperFactory |
getSocketChannelWrapperFactory()
Returns SocketChannelWrapperFactory instance to be used by this Node.
|
void |
handleExcludedMemberUuids(Address sender,
Set<String> excludedMemberUuids)
Handles the uuid set of excluded members only if this member is also excluded, and triggers the member force start process.
|
boolean |
isMemberExcluded(Address memberAddress,
String memberUuid)
Checks if the given member has been excluded during the cluster start or not.
|
boolean |
isNodeVersionCompatibleWith(ClusterVersion 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(ClusterVersion newVersion)
Called after cluster version is changed.
|
void |
onPartitionStateChange()
Called 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 |
resetHotRestartData()
Resets local hot restart data and gets a new uuid, if the local node hasn't completed the start process and
it is excluded in cluster start.
|
void |
shutdown()
Shutdowns NodeExtension.
|
boolean |
triggerForceStart()
Forces node to start by skipping hot-restart completely and removing all hot-restart data
even if node is still on validation phase or loading hot-restart data.
|
boolean |
triggerPartialStart()
Triggers partial start if the cluster cannot be started with full recovery and
HotRestartPersistenceConfig.clusterDataRecoveryPolicy is set accordingly. |
void |
validateJoinRequest(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()
InternalSerializationService createSerializationService()
SecurityContext getSecurityContext()
<T> T createService(Class<T> type)
type
- type of serviceIllegalArgumentException
- if type is not knownMap<String,Object> createExtensionServices()
MemberSocketInterceptor getMemberSocketInterceptor()
SocketChannelWrapperFactory getSocketChannelWrapperFactory()
ReadHandler createReadHandler(TcpIpConnection connection, IOService ioService)
connection
- tcp-ip connectionioService
- IOServiceWriteHandler createWriteHandler(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(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 onClusterVersionChange(ClusterVersion newVersion)
newVersion
- the new version at which the cluster operates.boolean isNodeVersionCompatibleWith(ClusterVersion clusterVersion)
clusterVersion
- the cluster version to check againsttrue
if compatible, otherwise false.boolean registerListener(Object listener)
listener
- listener instanceboolean triggerForceStart()
boolean triggerPartialStart()
HotRestartPersistenceConfig.clusterDataRecoveryPolicy
is set accordingly.HotRestartService getHotRestartBackupService()
String createMemberUuid(Address address)
address
- address of local memberboolean isMemberExcluded(Address memberAddress, String memberUuid)
memberAddress
- address of the member to checkmemberUuid
- uuid of the member to checkSet<String> getExcludedMemberUuids()
void handleExcludedMemberUuids(Address sender, Set<String> excludedMemberUuids)
sender
- the member that has sent the excluded members setexcludedMemberUuids
- uuids of the members that have been excluded during the cluster startClusterHotRestartStatusDTO getCurrentClusterHotRestartStatus()
void resetHotRestartData()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.