public class HazelcastClusterLocker extends Thread implements ClusterLocker
ILock.Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static String |
PRIMARY_SERVER_LOCK_ID |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
HazelcastClusterLocker(String lockId,
com.hazelcast.core.HazelcastInstance hazelcastInstance,
PrimaryClusterNodeNotifier primaryClusterNodeNotifier,
int heartbeatTimeoutSecs)
Creates a new instance to acquire a lock
|
| Modifier and Type | Method and Description |
|---|---|
com.hazelcast.core.ILock |
getLock() |
void |
notifyIfPollingNode()
Provides a way to synchronize the access to the cluster lock.
|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final String PRIMARY_SERVER_LOCK_ID
public HazelcastClusterLocker(String lockId, com.hazelcast.core.HazelcastInstance hazelcastInstance, PrimaryClusterNodeNotifier primaryClusterNodeNotifier, int heartbeatTimeoutSecs)
lockId - the id of the lock to be acquiredhazelcastInstance - the hazelcast instance used to acquire the lockprimaryClusterNodeNotifier - used to notify the acquisition of the lockheartbeatTimeoutSecs - the value of the heartbeat timeout as configured in Hazelcastpublic void notifyIfPollingNode()
ClusterLockernotifyIfPollingNode in interface ClusterLockerpublic com.hazelcast.core.ILock getLock()
Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.