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) |
DistributedObject |
createDistributedObject(String proxyName)
Creates a distributed object.
|
protected com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry |
createNewRegistry(CPGroupId groupId)
Creates a registry for the given Raft group.
|
void |
destroyDistributedObject(String objectName)
Destroys a distributed object.
|
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
|
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.
|
AcquireResult |
tryAcquire(CPGroupId groupId,
String name,
LockInvocationKey key,
long timeoutMs) |
addLiveOperation, destroyRaftObject, expireWaitKeys, getAttachedSessions, getLiveOperations, getOrInitRegistry, getRegistryOrNull, heartbeatSession, init, notifyWaitKeys, onCPSubsystemRestart, onGroupDestroy, onSessionClose, populate, reset, restoreSnapshot, scheduleTimeout, setSessionAccessor, shutdown, shutdownImpl, takeSnapshotpublic static final String SERVICE_NAME
public RaftLockService(NodeEngine nodeEngine)
protected void initImpl()
AbstractBlockingServiceinitImpl in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>public AcquireResult acquire(CPGroupId groupId, String name, LockInvocationKey key)
public AcquireResult tryAcquire(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)
AbstractBlockingServicecreateNewRegistry in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>protected Object expiredWaitKeyResponse()
AbstractBlockingServiceexpiredWaitKeyResponse 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()
AbstractBlockingServiceserviceName in class AbstractBlockingService<LockInvocationKey,RaftLock,com.hazelcast.cp.internal.datastructures.lock.RaftLockRegistry>public DistributedObject createDistributedObject(String proxyName)
RemoteServiceproxyName - the name for the created distributed objectpublic void destroyDistributedObject(String objectName)
RemoteServiceobjectName - the name of the distributed object to destroyCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.