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,
long commitIndex,
String name,
LockEndpoint endpoint,
UUID invocationUid) |
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,
long commitIndex,
String name,
LockEndpoint endpoint,
UUID invocationUid,
long timeoutMs) |
destroyRaftObject, expireWaitKeys, getAttachedSessions, getOrInitRegistry, getRegistryOrNull, heartbeatSession, init, notifyWaitKeys, onCPSubsystemRestart, onGroupDestroy, onSessionClose, 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, long commitIndex, String name, LockEndpoint endpoint, UUID invocationUid)
public AcquireResult tryAcquire(CPGroupId groupId, long commitIndex, String name, LockEndpoint endpoint, UUID invocationUid, 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 DistributedObject createDistributedObject(String proxyName)
RemoteService
proxyName
- the name for the created distributed objectpublic void destroyDistributedObject(String objectName)
RemoteService
objectName
- the name of the distributed object to destroyCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.