| 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(int count,
Function<Integer,IPromise<T>> loop) |
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
|
static <T> IPromise<List<T>> |
Actors.allMapped(List<IPromise<T>> futures)
similar all but map promises to their content
returns a future which is settled once all promises provided are settled
|
IPromise |
Actor.ask(String messageId,
Object... args)
generic method for untyped remoting.
|
IPromise |
Actor.askMsg(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(Consumer<Object> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(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(Function<Object,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(Function<Object,IPromise<OUT>> function)
called if an error has been signaled by one of the futures in the previous future chain.
|
IPromise |
RemoteConnection.closeNetwork()
closes underlying network connection also.
|
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(Consumer errorHandler)
see IPromise (inheriting Callback) interface
|
default IPromise<T> |
IPromise.onError(Consumer<Object> errorHandler)
called when an error is set as the result
forwards to (new) "catchError" variant.
|
IPromise<T> |
Promise.onResult(Consumer<T> resultHandler)
see IPromise (inheriting Callback) interface
|
default IPromise<T> |
IPromise.onResult(Consumer<T> resultHandler)
called when a valid result of a future becomes available.
|
IPromise<T> |
Promise.onTimeout(Consumer timeoutHandler)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.onTimeout(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(Consumer<T> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.then(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(Function<T,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.thenAnd(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(Supplier<IPromise<T>> callable)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.thenAnd(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<T> |
IPromise.timeoutIn(long millis)
tellMsg 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> Stream<T> |
Actors.awaitAll(IPromise<T>... futures)
await until all futures are settled and stream their results.
|
static <T> 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 |
|---|---|
boolean |
Actor.__dispatchRemoteCall(ObjectSocket objSocket,
RemoteCallEntry rce,
RemoteRegistry registry,
List<IPromise> createdFutures,
Object authContext,
BiFunction<Actor,String,Boolean> callInterceptor)
called if a message invokation from remote is received
|
static <T> IPromise<IPromise<T>[]> |
Actors.all(int count,
Function<Integer,IPromise<T>> loop) |
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> IPromise<List<T>> |
Actors.allMapped(List<IPromise<T>> futures)
similar all but map promises to their content
returns a future which is settled once all promises provided are settled
|
static <T> Stream<T> |
Actors.awaitAll(List<IPromise<T>> futures) |
static <T> Stream<T> |
Actors.awaitAll(long timeoutMS,
List<IPromise<T>> futures) |
<OUT> IPromise<OUT> |
Promise.catchError(Function<Object,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.catchError(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,
Consumer<IPromise> toRun)
enforce serial execution of asynchronous tasks.
|
<OUT> IPromise<OUT> |
Promise.thenAnd(Function<T,IPromise<OUT>> function)
see IPromise (inheriting Callback) interface
|
<OUT> IPromise<OUT> |
IPromise.thenAnd(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(Supplier<IPromise<T>> callable)
see IPromise (inheriting Callback) interface
|
IPromise<T> |
IPromise.thenAnd(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,
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>
If a promise or callback is wrapped by this, it will be treated correctly when remoted.
|
| Modifier and Type | Method and Description |
|---|---|
IPromise<T> |
CallbackWrapper.awaitPromise(long timeout) |
<OUT> IPromise<OUT> |
CallbackWrapper.catchError(Consumer<Object> function) |
<OUT> IPromise<OUT> |
CallbackWrapper.catchError(Function<Object,IPromise<OUT>> function) |
IPromise |
CallEntry.getFutureCB() |
IPromise |
SimpleScheduler.getReport() |
IPromise |
DispatcherThread.getReport() |
IPromise<Monitorable[]> |
SimpleScheduler.getSubMonitorables() |
IPromise<Monitorable[]> |
DispatcherThread.getSubMonitorables() |
IPromise<T> |
CallbackWrapper.onError(Consumer errorHandler) |
IPromise<T> |
CallbackWrapper.onResult(Consumer<T> resultHandler)
Warning: this will not be called on error or timeout
|
IPromise<T> |
CallbackWrapper.onTimeout(Consumer timeoutHandler) |
IPromise |
SimpleScheduler.put2QueuePolling(CallEntry e) |
IPromise |
CallbackWrapper.then(Callback<T> result)
Warning: this will not be called on error or timeout
|
<OUT> IPromise<OUT> |
CallbackWrapper.then(Consumer<T> function) |
IPromise<T> |
CallbackWrapper.then(Runnable result)
Warning: this will not be called on error or timeout
|
<OUT> IPromise<OUT> |
CallbackWrapper.thenAnd(Function<T,IPromise<OUT>> function) |
IPromise<T> |
CallbackWrapper.thenAnd(Supplier<IPromise<T>> result) |
IPromise |
CallbackWrapper.timeoutIn(long millis) |
| Modifier and Type | Method and Description |
|---|---|
void |
CallEntry.setFutureCB(IPromise futureCB) |
| Modifier and Type | Method and Description |
|---|---|
<OUT> IPromise<OUT> |
CallbackWrapper.catchError(Function<Object,IPromise<OUT>> function) |
<OUT> IPromise<OUT> |
CallbackWrapper.thenAnd(Function<T,IPromise<OUT>> function) |
IPromise<T> |
CallbackWrapper.thenAnd(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 |
RemoteRegistry.closeNetwork() |
IPromise |
ActorServerConnector.closeServer() |
IPromise<T> |
ActorClient.connect() |
default <T> IPromise<T> |
ConnectableActor.connect() |
default <T> IPromise<T> |
ConnectableActor.connect(Callback<ActorClientConnector> disconnectCallback) |
<T> IPromise<T> |
LocalConnectable.connect(Callback<ActorClientConnector> disconnectCallback,
Consumer<Actor> actorDisconnecCB)
disconnect callback will never be called (local actor connection)
|
<T> IPromise<T> |
ConnectableActor.connect(Callback<ActorClientConnector> disconnectCallback,
Consumer<Actor> actorDisconnecCB) |
IPromise |
ActorClientConnector.connect(Function<ObjectSocket,ObjectSink> factory) |
IPromise<T> |
ActorClient.connect(int qsiz) |
IPromise<T> |
ActorClient.connect(int qsiz,
Consumer<Actor> discon) |
default IPromise<ActorServer> |
ActorPublisher.publish() |
IPromise<ActorServer> |
ActorPublisher.publish(Consumer<Actor> disconnectCallback) |
IPromise<Actor> |
SessionResurrector.reanimate(String sessionId,
long remoteRefId)
reanimate a remote ref of a resurrected facade connection
|
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,
Object authContext) |
default void |
ObjectSink.receiveObject(Object received,
List<IPromise> createdFutures,
Object securityContext) |
void |
ObjectSink.receiveObject(ObjectSink sink,
Object received,
List<IPromise> createdFutures,
Object securityContext) |
boolean |
RemoteRegistry.receiveObject(ObjectSocket responseChannel,
ObjectSink receiver,
Object response,
List<IPromise> createdFutures,
Object authContext)
process a remote call entry or an array of remote call entries.
|
| Modifier and Type | Method and Description |
|---|---|
IPromise |
TCPClientConnector.closeClient() |
IPromise |
NIOServerConnector.closeServer() |
IPromise |
TCPServerConnector.closeServer() |
<T> IPromise<T> |
TCPConnectable.connect(Callback<ActorClientConnector> disconnectCallback,
Consumer<Actor> actorDisconnecCB) |
IPromise |
TCPClientConnector.connect(Function<ObjectSocket,ObjectSink> factory) |
static IPromise<ActorServer> |
NIOServerConnector.Publish(Actor facade,
int port,
Coding coding) |
IPromise<ActorServer> |
TCPPublisher.publish(Consumer<Actor> disconnectCallback)
Deprecated.
|
IPromise<ActorServer> |
TCPNIOPublisher.publish(Consumer<Actor> disconnectHandler) |
| Modifier and Type | Method and Description |
|---|---|
IPromise<T> |
PromiseLatch.getPromise() |
IPromise<IPromise> |
TicketMachine.getTicket(Object channelKey) |
<X> IPromise<T>[] |
Hoarde.map(BiFunction<T,Integer,IPromise<X>> init) |
IPromise |
Hoarde.ordered(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(BiFunction<T,Integer,IPromise<X>> init) |
IPromise |
Hoarde.ordered(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 © 2017. All rights reserved.