jconch.lock
Class RWLogEqLock<OBJ_T>

java.lang.Object
  extended by jconch.lock.AbstractLogEqLock<OBJ_T,ReadWriteLock>
      extended by jconch.lock.RWLogEqLock<OBJ_T>
Type Parameters:
OBJ_T - The type of object compared by the logical equivalent locks.

public class RWLogEqLock<OBJ_T>
extends AbstractLogEqLock<OBJ_T,ReadWriteLock>

Class that provides ReadWriteLock instances tagged by logically equivalent objects.

Author:
Robert Fischer

Constructor Summary
RWLogEqLock()
          Constructor.
 
Method Summary
protected  ReadWriteLock createNewLock()
          Implementation of the "lock" that is created.
static RWLogEqLock<Object> getGlobalInstance()
          Provides the same instance of this class every time.
 
Methods inherited from class jconch.lock.AbstractLogEqLock
getLock, hasLockFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RWLogEqLock

public RWLogEqLock()
Constructor.

Method Detail

getGlobalInstance

public static RWLogEqLock<Object> getGlobalInstance()
Provides the same instance of this class every time.

Returns:
A singleton instance.

createNewLock

protected ReadWriteLock createNewLock()
Description copied from class: AbstractLogEqLock
Implementation of the "lock" that is created.

Specified by:
createNewLock in class AbstractLogEqLock<OBJ_T,ReadWriteLock>
Returns:
An object to use for a lock.