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, TimeUnit unit)
          Await for the specified time for the condition to become true.
 

Method Detail

await

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

Throws:
{@link - InterruptedException} if interrupted
InterruptedException

await

boolean await(long time,
              TimeUnit unit)
              throws 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
InterruptedException


Copyright © 2014 Atlassian. All Rights Reserved.