org.terracotta.collections
Class BasicLockStrategy<K>

java.lang.Object
  extended by org.terracotta.collections.BasicLockStrategy<K>
All Implemented Interfaces:
LockStrategy<K>
Direct Known Subclasses:
HashcodeLockStrategy, NullLockStrategy, OneToOneLockStrategy

public abstract class BasicLockStrategy<K>
extends Object
implements LockStrategy<K>


Constructor Summary
BasicLockStrategy()
           
 
Method Summary
 void beginLock(String lockID, int type)
           
 void commitLock(String lockID, int type)
           
 void pinLock(String lockID)
           
 boolean tryBeginLock(String lockID, int type, long nanos)
           
 void unpinLock(String lockID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.terracotta.collections.LockStrategy
generateLockIdForKey
 

Constructor Detail

BasicLockStrategy

public BasicLockStrategy()
Method Detail

beginLock

public void beginLock(String lockID,
                      int type)
Specified by:
beginLock in interface LockStrategy<K>

pinLock

public void pinLock(String lockID)
Specified by:
pinLock in interface LockStrategy<K>

unpinLock

public void unpinLock(String lockID)
Specified by:
unpinLock in interface LockStrategy<K>

commitLock

public void commitLock(String lockID,
                       int type)
Specified by:
commitLock in interface LockStrategy<K>

tryBeginLock

public boolean tryBeginLock(String lockID,
                            int type,
                            long nanos)
                     throws InterruptedException
Specified by:
tryBeginLock in interface LockStrategy<K>
Throws:
InterruptedException


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.