public class RaftSemaphoreService extends AbstractBlockingService<AcquireInvocationKey,RaftSemaphore,RaftSemaphoreRegistry>
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 |
---|
RaftSemaphoreService(NodeEngine nodeEngine) |
Modifier and Type | Method and Description |
---|---|
boolean |
acquirePermits(CPGroupId groupId,
long commitIndex,
String name,
SemaphoreEndpoint endpoint,
UUID invocationUid,
int permits,
long timeoutMs) |
int |
availablePermits(CPGroupId groupId,
String name) |
boolean |
changePermits(CPGroupId groupId,
long commitIndex,
String name,
SemaphoreEndpoint endpoint,
UUID invocationUid,
int permits) |
DistributedObject |
createDistributedObject(String proxyName)
Creates a distributed object.
|
protected RaftSemaphoreRegistry |
createNewRegistry(CPGroupId groupId)
Creates a registry for the given Raft group.
|
void |
destroyDistributedObject(String objectName)
Destroys a distributed object.
|
int |
drainPermits(CPGroupId groupId,
String name,
long commitIndex,
SemaphoreEndpoint endpoint,
UUID invocationUid) |
protected Object |
expiredWaitKeyResponse()
Creates the response object that will be sent for a expired wait key.
|
boolean |
initSemaphore(CPGroupId groupId,
String name,
int permits) |
void |
releasePermits(CPGroupId groupId,
long commitIndex,
String name,
SemaphoreEndpoint endpoint,
UUID invocationUid,
int permits) |
protected String |
serviceName()
Returns name of the service.
|
destroyRaftObject, expireWaitKeys, getAttachedSessions, getOrInitRegistry, getRegistryOrNull, heartbeatSession, init, initImpl, notifyWaitKeys, onCPSubsystemRestart, onGroupDestroy, onRegistryRestored, onSessionClose, reset, restoreSnapshot, scheduleTimeout, setSessionAccessor, shutdown, shutdownImpl, takeSnapshot
public static final String SERVICE_NAME
public RaftSemaphoreService(NodeEngine nodeEngine)
public boolean acquirePermits(CPGroupId groupId, long commitIndex, String name, SemaphoreEndpoint endpoint, UUID invocationUid, int permits, long timeoutMs)
public void releasePermits(CPGroupId groupId, long commitIndex, String name, SemaphoreEndpoint endpoint, UUID invocationUid, int permits)
public int drainPermits(CPGroupId groupId, String name, long commitIndex, SemaphoreEndpoint endpoint, UUID invocationUid)
public boolean changePermits(CPGroupId groupId, long commitIndex, String name, SemaphoreEndpoint endpoint, UUID invocationUid, int permits)
protected RaftSemaphoreRegistry createNewRegistry(CPGroupId groupId)
AbstractBlockingService
createNewRegistry
in class AbstractBlockingService<AcquireInvocationKey,RaftSemaphore,RaftSemaphoreRegistry>
protected Object expiredWaitKeyResponse()
AbstractBlockingService
expiredWaitKeyResponse
in class AbstractBlockingService<AcquireInvocationKey,RaftSemaphore,RaftSemaphoreRegistry>
protected String serviceName()
AbstractBlockingService
serviceName
in class AbstractBlockingService<AcquireInvocationKey,RaftSemaphore,RaftSemaphoreRegistry>
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.