com.atlassian.jira.index
Class DefaultIndex.Success

java.lang.Object
  extended by com.atlassian.jira.index.DefaultIndex.Success
All Implemented Interfaces:
Index.Result
Enclosing class:
DefaultIndex

public static class DefaultIndex.Success
extends Object
implements Index.Result

Indicate that an operation completed successfully.


Constructor Summary
DefaultIndex.Success()
           
 
Method Summary
 void await()
          Await the result of the operation.
 boolean await(long timeout, TimeUnit unit)
          Await the result of the operation for the specified time, throwing a TimeoutException if the timeout is reached.
 boolean isDone()
          Has the operation completed yet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIndex.Success

public DefaultIndex.Success()
Method Detail

await

public void await()
Description copied from interface: Index.Result
Await the result of the operation.

Specified by:
await in interface Index.Result

await

public boolean await(long timeout,
                     TimeUnit unit)
Description copied from interface: Index.Result
Await the result of the operation for the specified time, throwing a TimeoutException if the timeout is reached.

Specified by:
await in interface Index.Result
Parameters:
timeout - the amount to wait
unit - the unit to count the timeout in
Returns:
false if the timeout is exceeded before the underlying operation has completed, true if it has completed in time.

isDone

public boolean isDone()
Description copied from interface: Index.Result
Has the operation completed yet. If true then Index.Result.await() and Index.Result.await(long, TimeUnit) will not block.

Specified by:
isDone in interface Index.Result
Returns:
whether the operation is complete or not.


Copyright © 2002-2014 Atlassian. All Rights Reserved.