org.compass.needle.terracotta
Class TerracottaLock

java.lang.Object
  extended by org.apache.lucene.store.Lock
      extended by org.compass.needle.terracotta.TerracottaLock

 class TerracottaLock
extends Lock

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.store.Lock
Lock.With
 
Field Summary
 
Fields inherited from class org.apache.lucene.store.Lock
failureReason, LOCK_OBTAIN_WAIT_FOREVER, LOCK_POLL_INTERVAL
 
Constructor Summary
TerracottaLock(ConcurrentHashMap<String,Object> locks, String lockName)
           
 
Method Summary
 boolean isLocked()
           
 boolean obtain()
           
 void release()
           
 String toString()
           
 
Methods inherited from class org.apache.lucene.store.Lock
obtain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TerracottaLock

public TerracottaLock(ConcurrentHashMap<String,Object> locks,
                      String lockName)
Method Detail

obtain

public boolean obtain()
               throws IOException
Specified by:
obtain in class Lock
Throws:
IOException

release

public void release()
Specified by:
release in class Lock

isLocked

public boolean isLocked()
Specified by:
isLocked in class Lock

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2009 The Compass Project.