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 |
---|---|
AcquireResult |
acquirePermits(CPGroupId groupId,
String name,
AcquireInvocationKey key,
long timeoutMs) |
int |
availablePermits(CPGroupId groupId,
String name) |
boolean |
changePermits(CPGroupId groupId,
long commitIndex,
String name,
SemaphoreEndpoint endpoint,
UUID invocationUid,
int permits) |
protected RaftSemaphoreRegistry |
createNewRegistry(CPGroupId groupId)
Creates a registry for the given Raft group.
|
ISemaphore |
createProxy(String proxyName)
Creates a proxy for a CP data structure.
|
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, getLiveOperations, getOrInitRegistry, getRegistryOrNull, heartbeatSession, init, initImpl, notifyWaitKeys, onCPSubsystemRestart, onRaftGroupDestroyed, onRaftNodeSteppedDown, onRegistryRestored, onSessionClose, populate, reset, restoreSnapshot, scheduleTimeout, setSessionAccessor, shutdown, shutdownImpl, takeSnapshot
public static final String SERVICE_NAME
public RaftSemaphoreService(NodeEngine nodeEngine)
public AcquireResult acquirePermits(CPGroupId groupId, String name, AcquireInvocationKey key, 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 ISemaphore createProxy(String proxyName)
RaftRemoteService
proxyName
- the name of the CP data structureCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.