Class Locks
java.lang.Object
com.oracle.coherence.concurrent.locks.Locks
Factory methods for various local and remote lock implementations.
- Since:
- 21.12
- Author:
- Aleks Seovic 2021.10.20
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn CoherenceNamedMap
containing the exclusive locks state.static ReentrantLock
Return a singleton instance of a localReentrantLock
with a specified name.static ReentrantReadWriteLock
localReadWriteLock
(String sName) Return a singleton instance of a localReentrantReadWriteLock
with a specified name.Return CoherenceNamedMap
containing the read/write locks state.static RemoteLock
remoteLock
(String sName) Return a singleton instance of a remoteRemoteLock
with a specified name.static RemoteReadWriteLock
remoteReadWriteLock
(String sName) Return a singleton instance of a remoteRemoteReadWriteLock
with a specified name.protected static Session
session()
Return CoherenceSession
for the Locks module.
-
Field Details
-
SESSION_NAME
The session name.
-
-
Constructor Details
-
Locks
public Locks()
-
-
Method Details
-
localLock
Return a singleton instance of a localReentrantLock
with a specified name.- Parameters:
sName
- the process-wide, unique name of the lock- Returns:
- an instance of a local lock with a specified name
-
remoteLock
Return a singleton instance of a remoteRemoteLock
with a specified name.- Parameters:
sName
- the cluster-wide, unique name of the lock- Returns:
- an instance of a remote lock with a specified name
-
localReadWriteLock
Return a singleton instance of a localReentrantReadWriteLock
with a specified name.- Parameters:
sName
- the process-wide, unique name of the lock- Returns:
- an instance of a local read/write lock with a specified name
-
remoteReadWriteLock
Return a singleton instance of a remoteRemoteReadWriteLock
with a specified name.- Parameters:
sName
- the cluster-wide, unique name of the lock- Returns:
- an instance of a remote read/write lock with a specified name
-
session
Return CoherenceSession
for the Locks module.- Returns:
- Coherence
Session
for the Locks module
-
exclusiveLocksMap
public static NamedMap<String,com.oracle.coherence.concurrent.locks.internal.ExclusiveLockHolder> exclusiveLocksMap()Return CoherenceNamedMap
containing the exclusive locks state.- Returns:
- Coherence
NamedMap
containing the exclusive locks state
-
readWriteLocksMap
public static NamedMap<String,com.oracle.coherence.concurrent.locks.internal.ReadWriteLockHolder> readWriteLocksMap()Return CoherenceNamedMap
containing the read/write locks state.- Returns:
- Coherence
NamedMap
containing the read/write locks state
-