Interface RemoteResult<T>
-
public interface RemoteResult<T>Object containing a remote invocation result for an individual node.
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectNULL_RESULTValue used bygetResult()as a success value in the case where the invoked method returnednullor has a void return type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetNodeID()Get the node ID of the node where this result has come from.com.opencloud.util.Fallible<T,RemoteException>getResult()Get the return result for the remote invocation on the node given bygetNodeID().booleanisResultAvailable()Determine if a result is available yet for the node given bygetNodeID().
-
-
-
Field Detail
-
NULL_RESULT
static final Object NULL_RESULT
Value used by
getResult()as a success value in the case where the invoked method returnednullor has a void return type.
-
-
Method Detail
-
getNodeID
int getNodeID()
Get the node ID of the node where this result has come from.
- Returns:
- the node ID of the node where this result has come from.
-
isResultAvailable
boolean isResultAvailable()
Determine if a result is available yet for the node given by
getNodeID(). For a synchronous invocation, this method always returnstrue.- Returns:
trueif a result has been obtained for the invocation on the specified node,falseif the invocation result is still pending.
-
getResult
com.opencloud.util.Fallible<T,RemoteException> getResult()
Get the return result for the remote invocation on the node given by
getNodeID(). If the result is not yet available, this method blocks until the result is received. If the invocation succeeded and returned null or no value, the value returned from thisFallibleisNULL_RESULT(Fallibledisallows null result values). If the invocation failed, theRemoteExceptionobtained from thisFalliblecontains the exception thrown by the remote node as the cause, which may includeNoListenerExceptionif no listener was registered to receive the request on that node.- Returns:
- the return result for the remote invocation.
-
-