com.atlassian.util.concurrent
Interface Awaitable

All Known Subinterfaces:
ReusableLatch
All Known Implementing Classes:
BooleanLatch, PhasedLatch

public interface Awaitable

Something that can be awaited upon.

Author:
Jed Wesley-Smith

Method Summary
 void await()
          Await for the condition to become true.
 boolean await(long time, java.util.concurrent.TimeUnit unit)
          Await for the specified time for the condition to become true.
 

Method Detail

await

void await()
           throws java.lang.InterruptedException
Await for the condition to become true.

Throws:
{@link - InterruptedException} if interrupted
java.lang.InterruptedException

await

boolean await(long time,
              java.util.concurrent.TimeUnit unit)
              throws java.lang.InterruptedException
Await for the specified time for the condition to become true.

Parameters:
time - the amount to wait.
unit - the unit to wait in.
Returns:
true if the condition became true within the time limit, false otherwise.
Throws:
{@link - InterruptedException} if interrupted
java.lang.InterruptedException


Copyright © 2011 Atlassian. All Rights Reserved.