@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Batched
A batched method must declare returning void, a Remote
object, Completion or Future. Returning a Remote
object allows batched calls to be chained together. A batched task
represented by a Completion or Future cannot be cancelled,
at least not directly. Implementations of batched future methods should
return a factory generated response.
@Batched void setOption(int option) throws RemoteException; @Batched RemoteAccess login(String user, String password) throws RemoteException, AuthFailure;Batched methods can declare throwing any exception, and any exception thrown by the server aborts the batch operation. This exception is passed to the caller of the immediate or synchronous method that terminated the batch. If the terminating method does not declare throwing the exception type, it is wrapped by
UndeclaredThrowableException. Any Remote objects
returned from batched methods at or after the exception being thrown will be
bogus. Attempts to invoke methods on these objects will also throw the
original exception, possibly wrapped.
Any exception thrown by a batched method which returns a Completion or Future is passed to the caller via the returned
object. Upon calling get, an ExecutionException
is thrown. A communication failure while sending the request is thrown
directly to the caller and not through the Future.
Asynchronous,
Unbatchedpublic abstract CallMode value
Copyright © 2006–2015 Cojen. All rights reserved.