| Modifier and Type | Class and Description |
|---|---|
class |
Promise<T>
implementation of the IPromise interface.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> IPromise<IPromise<T>[]> |
Actors.all(IPromise<T>... futures)
similar to es6 Promise.all method, however non-IPromise objects are not allowed
returns a future which is settled once all promises provided are settled
|
static <T> IPromise<List<IPromise<T>>> |
Actors.all(List<IPromise<T>> futures)
similar to es6 Promise.all method, however non-IPromise objects are not allowed
returns a future which is settled once all promises provided are settled
|
IPromise |
Actor.ask(String messageId,
Object... args)
generic method for untyped messages.
|
default IPromise<T> |
IPromise.awaitPromise()
similar to await but does not unwrap the promise.
|
IPromise<T> |
Promise.awaitPromise(long timeout)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.awaitPromise(long timeout)
schedule other events/messages until future is resolved/settled (Nonblocking delay).
|
<OUT> IPromise<OUT> |
Promise.catchError(java.util.function.Consumer<Object> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(java.util.function.Consumer<Object> function)
called if an error has been signaled by one of the futures in the previous future chain.
|
<OUT> IPromise<OUT> |
Promise.catchError(java.util.function.Function<Object,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(java.util.function.Function<Object,IPromise<OUT>> function)
called if an error has been signaled by one of the futures in the previous future chain.
|
static IPromise |
Actors.complete()
abbreviation for Promise creation to make code more concise
|
static <T> IPromise<T> |
Actors.complete(T res,
Object err)
abbreviation for Promise creation to make code more concise
|
<T> IPromise<T> |
Actor.exec(Callable<T> callable)
execute a callable asynchronously (in a different thread) and return a future
of the result (delivered in caller thread).
|
IPromise |
Actor.getReport() |
IPromise<Monitorable[]> |
Actor.getSubMonitorables() |
IPromise<T> |
Promise.onError(java.util.function.Consumer errorHandler)
see IPromise (inheriting Callback) interface
|
default IPromise<T> |
IPromise.onError(java.util.function.Consumer<Object> errorHandler)
called when an error is set as the result
forwards to (new) "catchError" variant.
|
IPromise<T> |
Promise.onResult(java.util.function.Consumer<T> resultHandler)
see IPromise (inheriting Callback) interface
|
default IPromise<T> |
IPromise.onResult(java.util.function.Consumer<T> resultHandler)
called when a valid result of a future becomes available.
|
IPromise<T> |
Promise.onTimeout(java.util.function.Consumer timeoutHandler)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.onTimeout(java.util.function.Consumer timeoutHandler)
called when the async call times out.
|
default IPromise<T> |
IPromise.onTimeout(Runnable timeoutHandler) |
IPromise |
Actor.ping()
can be used to wait for all messages having been processed and get a signal from the returned future once this is complete
|
static <T> IPromise<T> |
Actors.race(Collection<IPromise<T>> futures)
similar to es6 Promise.race method, however non-IPromise objects are not allowed
returns a future which is settled once one of the futures provided gets settled
|
static <T> IPromise<T> |
Actors.race(IPromise<T>... futures)
similar to es6 Promise.race method, however non-IPromise objects are not allowed
returns a future which is settled once one of the futures provided gets settled
|
static <T> IPromise<T> |
Actors.reject(Object err)
abbreviation for Promise creation to make code more concise
|
static IPromise |
Actors.resolve()
abbreviation for Promise creation to make code more concise
|
static <T> IPromise<T> |
Actors.resolve(T res)
abbreviation for Promise creation to make code more concise
|
IPromise |
Promise.then(Callback resultCB)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.then(Callback<T> result)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
<OUT> IPromise<OUT> |
Promise.then(java.util.function.Consumer<T> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.then(java.util.function.Consumer<T> function)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
IPromise<T> |
Promise.then(Runnable result)
see IPromise interface
|
IPromise<T> |
IPromise.then(Runnable result)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
<OUT> IPromise<OUT> |
Promise.thenAnd(java.util.function.Function<T,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.thenAnd(java.util.function.Function<T,IPromise<OUT>> function)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
IPromise<T> |
Promise.thenAnd(java.util.function.Supplier<IPromise<T>> callable)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.thenAnd(java.util.function.Supplier<IPromise<T>> result)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
IPromise |
Promise.timeoutIn(long millis)
see IPromise (inheriting Callback) interface
|
IPromise |
IPromise.timeoutIn(long millis)
tell the future to call the onTimeout callback in N milliseconds if future is not settled until then
|
| Modifier and Type | Method and Description |
|---|---|
static <T> IPromise<List<IPromise<T>>> |
Actors.all(List<IPromise<T>> futures)
similar to es6 Promise.all method, however non-IPromise objects are not allowed
returns a future which is settled once all promises provided are settled
|
| Modifier and Type | Method and Description |
|---|---|
static <T> IPromise<IPromise<T>[]> |
Actors.all(IPromise<T>... futures)
similar to es6 Promise.all method, however non-IPromise objects are not allowed
returns a future which is settled once all promises provided are settled
|
static <T> java.util.stream.Stream<T> |
Actors.awaitAll(IPromise<T>... futures)
await until all futures are settled and stream their results.
|
static <T> java.util.stream.Stream<T> |
Actors.awaitAll(long timeoutMS,
IPromise<T>... futures)
await until all futures are settled and stream their results
|
static <T> IPromise<T> |
Actors.race(IPromise<T>... futures)
similar to es6 Promise.race method, however non-IPromise objects are not allowed
returns a future which is settled once one of the futures provided gets settled
|
| Modifier and Type | Method and Description |
|---|---|
static <T> IPromise<List<IPromise<T>>> |
Actors.all(List<IPromise<T>> futures)
similar to es6 Promise.all method, however non-IPromise objects are not allowed
returns a future which is settled once all promises provided are settled
|
static <T> java.util.stream.Stream<T> |
Actors.awaitAll(List<IPromise<T>> futures) |
static <T> java.util.stream.Stream<T> |
Actors.awaitAll(long timeoutMS,
List<IPromise<T>> futures) |
<OUT> IPromise<OUT> |
Promise.catchError(java.util.function.Function<Object,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(java.util.function.Function<Object,IPromise<OUT>> function)
called if an error has been signaled by one of the futures in the previous future chain.
|
static <T> IPromise<T> |
Actors.race(Collection<IPromise<T>> futures)
similar to es6 Promise.race method, however non-IPromise objects are not allowed
returns a future which is settled once one of the futures provided gets settled
|
protected void |
Actor.serialOn(Object transactionKey,
java.util.function.Consumer<IPromise> toRun)
enforce serial execution of asynchronous tasks.
|
<OUT> IPromise<OUT> |
Promise.thenAnd(java.util.function.Function<T,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.thenAnd(java.util.function.Function<T,IPromise<OUT>> function)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
IPromise<T> |
Promise.thenAnd(java.util.function.Supplier<IPromise<T>> callable)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.thenAnd(java.util.function.Supplier<IPromise<T>> result)
called once any result of a future becomes available
Can be used in case a sender is not interested in the actual result
but when a remote method has finished processing.
|
| Modifier and Type | Method and Description |
|---|---|
IPromise |
_AsyncClientSocket.connect(String host,
int port,
java.util.function.BiFunction<SelectionKey,SocketChannel,AsyncSocketConnection> connectionFactory) |
protected IPromise |
AsyncSocketConnection.directWrite(ByteBuffer buf) |
IPromise<AsyncFileIOEvent> |
AsyncFile.read(long position,
int chunkSize,
ByteBuffer target) |
IPromise<AsyncFileIOEvent> |
AsyncFile.readFully() |
IPromise<AsyncFileIOEvent> |
AsyncFile.write(long filePosition,
ByteBuffer source) |
| Modifier and Type | Class and Description |
|---|---|
class |
CallbackWrapper<T>
..
|
| Modifier and Type | Method and Description |
|---|---|
void |
CallEntry.setFutureCB(IPromise futureCB) |
| Modifier and Type | Method and Description |
|---|---|
<OUT> IPromise<OUT> |
CallbackWrapper.catchError(java.util.function.Function<Object,IPromise<OUT>> function) |
<OUT> IPromise<OUT> |
CallbackWrapper.thenAnd(java.util.function.Function<T,IPromise<OUT>> function) |
IPromise<T> |
CallbackWrapper.thenAnd(java.util.function.Supplier<IPromise<T>> result) |
| Modifier and Type | Method and Description |
|---|---|
IPromise |
Monitorable.getReport() |
IPromise<Monitorable[]> |
Monitorable.getSubMonitorables() |
| Modifier and Type | Method and Description |
|---|---|
IPromise |
ActorServer.close() |
IPromise |
ActorClientConnector.closeClient() |
IPromise |
ActorServerConnector.closeServer() |
IPromise<T> |
ActorClient.connect() |
<T> IPromise<T> |
LocalConnectable.connect(Callback<ActorClientConnector> disconnectCallback)
disconnect callback will never be called (local actor connection)
|
<T> IPromise<T> |
ConnectableActor.connect(Callback<ActorClientConnector> disconnectCallback) |
IPromise |
ActorClientConnector.connect(java.util.function.Function<ObjectSocket,ObjectSink> factory) |
IPromise<T> |
ActorClient.connect(int qsiz) |
IPromise<ActorServer> |
ActorPublisher.publish() |
IPromise |
RemoteRefPolling.scheduleSendLoop(RemoteRegistry reg)
return a future which is completed upon connection close
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
RemoteRegistry.processRemoteCallEntry(ObjectSocket objSocket,
RemoteCallEntry response,
List<IPromise> createdFutures) |
default void |
ObjectSink.receiveObject(Object received,
List<IPromise> createdFutures) |
void |
ObjectSink.receiveObject(ObjectSink sink,
Object received,
List<IPromise> createdFutures) |
boolean |
RemoteRegistry.receiveObject(ObjectSocket responseChannel,
ObjectSink receiver,
Object response,
List<IPromise> createdFutures)
process a remote call entry or an array of remote call entries.
|
| Modifier and Type | Method and Description |
|---|---|
IPromise |
TCPClientConnector.closeClient() |
IPromise |
TCPServerConnector.closeServer() |
IPromise |
NIOServerConnector.closeServer() |
<T> IPromise<T> |
TCPConnectable.connect(Callback<ActorClientConnector> disconnectCallback) |
IPromise |
TCPClientConnector.connect(java.util.function.Function<ObjectSocket,ObjectSink> factory) |
IPromise<ActorServer> |
TCPPublisher.publish() |
IPromise<ActorServer> |
TCPNIOPublisher.publish() |
| Modifier and Type | Method and Description |
|---|---|
IPromise<T> |
PromiseLatch.getPromise() |
IPromise<IPromise> |
TicketMachine.getTicket(Object channelKey) |
<X> IPromise<T>[] |
Hoarde.map(java.util.function.BiFunction<T,Integer,IPromise<X>> init) |
IPromise |
Hoarde.ordered(java.util.function.Function<T,IPromise> toCall)
calls given function round robin.
|
| Modifier and Type | Method and Description |
|---|---|
IPromise<IPromise> |
TicketMachine.getTicket(Object channelKey) |
| Modifier and Type | Method and Description |
|---|---|
<X> IPromise<T>[] |
Hoarde.map(java.util.function.BiFunction<T,Integer,IPromise<X>> init) |
IPromise |
Hoarde.ordered(java.util.function.Function<T,IPromise> toCall)
calls given function round robin.
|
| Constructor and Description |
|---|
PromiseLatch(int counter,
IPromise<T> wrapped) |
PromiseLatch(IPromise<T> wrapped) |
PromiseLatch(IPromise<T> wrapped,
int counter) |
Copyright © 2015. All rights reserved.