Package com.oracle.coherence.concurrent
Class Semaphores
java.lang.Object
com.oracle.coherence.concurrent.Semaphores
Factory methods for local and remote semaphore implementations.
- Since:
- 21.12
- Author:
- Vaso Putica 2021.11.30
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalSemaphore
localSemaphore
(String sName, int cPermits) Return a singleton instance of aLocalSemaphore
with a specified name and number of permits.static RemoteSemaphore
remoteSemaphore
(String sName, int permits) Return a singleton instance of aRemoteSemaphore
with a specified name and number of permits.Return CoherenceNamedMap
for the remote semaphores.protected static Session
session()
Return CoherenceSession
for the Semaphore module.
-
Field Details
-
SESSION_NAME
The session name.
-
-
Constructor Details
-
Semaphores
public Semaphores()
-
-
Method Details
-
remoteSemaphore
Return a singleton instance of aRemoteSemaphore
with a specified name and number of permits.- Parameters:
sName
- the cluster-wide, unique name of the semaphorepermits
- the initial number of permits- Returns:
- an instance of a
RemoteSemaphore
with a specified name and number of permits
-
localSemaphore
Return a singleton instance of aLocalSemaphore
with a specified name and number of permits.- Parameters:
sName
- the process-wide, unique name of the semaphorecPermits
- the initial number of permits- Returns:
- an instance of a local semaphore with specified name and number of permits
-
semaphoresMap
public static NamedMap<String,com.oracle.coherence.concurrent.internal.SemaphoreStatus> semaphoresMap()Return CoherenceNamedMap
for the remote semaphores.- Returns:
- Coherence
NamedMap
for the remote semaphores
-
session
Return CoherenceSession
for the Semaphore module.- Returns:
- Coherence
Session
for the Semaphore module
-