de.uniba.wiai.lspi.chord.service
Interface ChordFuture

All Known Subinterfaces:
ChordRetrievalFuture

public interface ChordFuture

This interface represents the result of an asynchronouse invocation on an implementation of AsynChord.

The methods:

return immediately and return an instance of this, which can be used later on to check if the execution of an insertion, removal, or retrieval has been completed.

Version:
1.0.5
Author:
sven

Method Summary
 java.lang.Throwable getThrowable()
           
 boolean isDone()
          Method to test if the method associated with this has been finished.
 void waitForBeingDone()
          This method blocks the calling thread until the execution of the method associated with this has been finished.
 

Method Detail

getThrowable

java.lang.Throwable getThrowable()
Returns:
Any Throwable that occured during execution of the method associated with this. May be null. If isDone() returns true and this returns null the associated method has been executed successfully.

isDone

boolean isDone()
               throws ServiceException
Method to test if the method associated with this has been finished. This method does not block the calling thread.

Returns:
true if the method associated with this has finished successfully.
Throws:
ServiceException - Thrown if the execution has not been successful. Contains the Throwable that can be obtained by getThrowable() as cause.

waitForBeingDone

void waitForBeingDone()
                      throws ServiceException,
                             java.lang.InterruptedException
This method blocks the calling thread until the execution of the method associated with this has been finished.

Throws:
ServiceException - Thrown if the execution has not been successful. Contains the Throwable that can be obtained by getThrowable() as cause.
java.lang.InterruptedException - Occurs if the thread waiting with help of this method has been interrupted.