public class RaftLockService extends AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME
Name of the service
|
logger, nodeEngine, raftService, WAIT_TIMEOUT_TASK_UPPER_BOUND_MILLIS
Constructor and Description |
---|
RaftLockService(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.RaftLockRegistry |
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.
|
RaftLockOwnershipState |
getLockOwnershipState(CPGroupId groupId,
String name) |
protected void |
initImpl()
Subclasses can implement their custom initialization logic here
|
void |
onCPSubsystemRestart()
Called when the CP subsystem is restarted.
|
protected void |
onRegistryRestored(com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry registry) |
boolean |
release(CPGroupId groupId,
long commitIndex,
String name,
LockEndpoint endpoint,
UUID invocationUid) |
protected String |
serviceName()
Returns name of the service.
|
destroyRaftObject, expireWaitKeys, getAttachedSessions, getLiveOperations, getOrInitRegistry, getRegistryOrNull, heartbeatSession, init, notifyWaitKeys, onRaftGroupDestroyed, onRaftNodeSteppedDown, onSessionClose, populate, reset, restoreSnapshot, scheduleTimeout, setSessionAccessor, shutdown, shutdownImpl, takeSnapshot
public static final String SERVICE_NAME
public RaftLockService(NodeEngine nodeEngine)
protected void initImpl()
AbstractBlockingService
initImpl
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
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 RaftLockOwnershipState getLockOwnershipState(CPGroupId groupId, String name)
protected com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry createNewRegistry(CPGroupId groupId)
AbstractBlockingService
createNewRegistry
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
protected Object expiredWaitKeyResponse()
AbstractBlockingService
expiredWaitKeyResponse
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
protected void onRegistryRestored(com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry registry)
onRegistryRestored
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
protected String serviceName()
AbstractBlockingService
serviceName
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
public FencedLock createProxy(String proxyName)
RaftRemoteService
proxyName
- the name of the CP data structurepublic void onCPSubsystemRestart()
RaftManagedService
onCPSubsystemRestart
in interface RaftManagedService
onCPSubsystemRestart
in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.