com.atlassian.cache.impl
Class OneShotLatch

java.lang.Object
  extended by com.atlassian.cache.impl.OneShotLatch

public class OneShotLatch
extends Object

A useful synchronization construct for ensuring the correct behaviour of cache implementations.

The one-shot latch is initially held by the thread that creates it and must be explicitly released by it.

Since:
v2.4.5

Constructor Summary
OneShotLatch()
           
 
Method Summary
 void await()
           
 boolean await(long timeout, TimeUnit unit)
           
 boolean isHeldByCurrentThread()
           
 void release()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneShotLatch

public OneShotLatch()
Method Detail

isHeldByCurrentThread

public boolean isHeldByCurrentThread()

release

public void release()

await

public void await()

await

public boolean await(long timeout,
                     TimeUnit unit)
              throws InterruptedException
Throws:
InterruptedException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Atlassian. All rights reserved.