public class LockService extends AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME
Name of the service
|
logger, raftService, WAIT_TIMEOUT_TASK_UPPER_BOUND_MILLISnodeEngine| Constructor and Description |
|---|
LockService(NodeEngine nodeEngine) |
| Modifier and Type | Method and Description |
|---|---|
AcquireResult |
acquire(CPGroupId groupId,
String name,
LockInvocationKey key,
long timeoutMs) |
protected com.hazelcast.cp.internal.datastructures.lock.LockRegistry |
createNewRegistry(CPGroupId groupId)
Creates a registry for the given Raft group.
|
FencedLock |
createProxy(String proxyName)
Creates a proxy for a CP data structure.
|
protected Object |
expiredWaitKeyResponse()
Creates the response object that will be sent for a expired wait key.
|
LockOwnershipState |
getLockOwnershipState(CPGroupId groupId,
String name) |
protected void |
initImpl()
Subclasses can implement their custom initialization logic here
|
void |
onCPSubsystemRestart()
Called when CP Subsystem is restarted.
|
protected void |
onRegistryRestored(com.hazelcast.cp.internal.datastructures.lock.LockRegistry registry) |
boolean |
release(CPGroupId groupId,
long commitIndex,
String name,
LockEndpoint endpoint,
UUID invocationUid) |
protected String |
serviceName()
Returns name of the service.
|
clearPartitionReplica, destroyRaftObject, expireWaitKeys, getAttachedSessions, getBackupCount, getGroupIdSet, getLiveOperations, getOrInitRegistry, getRegistryOrNull, getSnapshotMap, heartbeatSession, init, notifyWaitKeys, onRaftGroupDestroyed, onRaftNodeSteppedDown, onSessionClose, populate, reset, restoreSnapshot, scheduleTimeout, setSessionAccessor, shutdown, shutdownImpl, takeSnapshotbeforeMigration, commitMigration, prepareReplicationOperation, rollbackMigrationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeMigration, commitMigration, prepareReplicationOperation, rollbackMigrationpublic static final String SERVICE_NAME
public LockService(NodeEngine nodeEngine)
protected void initImpl()
AbstractBlockingServiceinitImpl in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>public AcquireResult acquire(CPGroupId groupId, String name, LockInvocationKey key, long timeoutMs)
public boolean release(CPGroupId groupId, long commitIndex, String name, LockEndpoint endpoint, UUID invocationUid)
public LockOwnershipState getLockOwnershipState(CPGroupId groupId, String name)
protected com.hazelcast.cp.internal.datastructures.lock.LockRegistry createNewRegistry(CPGroupId groupId)
AbstractBlockingServicecreateNewRegistry in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>protected Object expiredWaitKeyResponse()
AbstractBlockingServiceexpiredWaitKeyResponse in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>protected void onRegistryRestored(com.hazelcast.cp.internal.datastructures.lock.LockRegistry registry)
onRegistryRestored in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>protected String serviceName()
AbstractBlockingServiceserviceName in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>public FencedLock createProxy(String proxyName)
RaftRemoteServiceproxyName - the name of the CP data structurepublic void onCPSubsystemRestart()
RaftManagedServiceonCPSubsystemRestart in interface RaftManagedServiceonCPSubsystemRestart in class AbstractBlockingService<LockInvocationKey,Lock,com.hazelcast.cp.internal.datastructures.lock.LockRegistry>Copyright © 2019 Hazelcast, Inc.. All rights reserved.