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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn CoherenceNamedMapcontaining the exclusive locks state.static ReentrantLockReturn a singleton instance of a localReentrantLockwith a specified name.static ReentrantReadWriteLocklocalReadWriteLock(String sName) Return a singleton instance of a localReentrantReadWriteLockwith a specified name.Return CoherenceNamedMapcontaining the read/write locks state.static RemoteLockremoteLock(String sName) Return a singleton instance of a remoteRemoteLockwith a specified name.static RemoteReadWriteLockremoteReadWriteLock(String sName) Return a singleton instance of a remoteRemoteReadWriteLockwith a specified name.protected static Sessionsession()Return CoherenceSessionfor the Locks module.
-
Field Details
-
SESSION_NAME
The session name.
-
-
Constructor Details
-
Locks
public Locks()
-
-
Method Details
-
localLock
Return a singleton instance of a localReentrantLockwith 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 remoteRemoteLockwith 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 localReentrantReadWriteLockwith 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 remoteRemoteReadWriteLockwith 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 CoherenceSessionfor the Locks module.- Returns:
- Coherence
Sessionfor the Locks module
-
exclusiveLocksMap
public static NamedMap<String,com.oracle.coherence.concurrent.locks.internal.ExclusiveLockHolder> exclusiveLocksMap()Return CoherenceNamedMapcontaining the exclusive locks state.- Returns:
- Coherence
NamedMapcontaining the exclusive locks state
-
readWriteLocksMap
public static NamedMap<String,com.oracle.coherence.concurrent.locks.internal.ReadWriteLockHolder> readWriteLocksMap()Return CoherenceNamedMapcontaining the read/write locks state.- Returns:
- Coherence
NamedMapcontaining the read/write locks state
-