Uses of Interface
org.nustaq.kontraktor.IPromise
-
Uses of IPromise in org.nustaq.kontraktor
Classes in org.nustaq.kontraktor that implement IPromise Modifier and Type Class Description classPromise<T>implementation of the IPromise interface.Methods in org.nustaq.kontraktor that return IPromise Modifier and Type Method Description static <T> IPromise<IPromise<T>[]>Actors. all(int count, java.util.function.Function<java.lang.Integer,IPromise<T>> loop)static <T> IPromise<java.util.List<IPromise<T>>>Actors. all(java.util.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 settledstatic <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 settledstatic <T> IPromise<java.util.List<T>>Actors. allMapped(java.util.List<IPromise<T>> futures)similar all but map promises to their content returns a future which is settled once all promises provided are settledIPromiseActor. ask(java.lang.String messageId, java.lang.Object... args)generic method for untyped remoting.IPromiseActor. askMsg(java.lang.String messageId, java.lang.Object... args)generic method for untyped messages.default IPromise<T>IPromise. awaitPromise()similar to await but does not unwrap the promise.IPromise<T>IPromise. awaitPromise(long timeout)schedule other events/messages until future is resolved/settled (Nonblocking delay).IPromise<T>Promise. awaitPromise(long timeout)see IPromise (inheriting Callback) interface<OUT> IPromise<OUT>IPromise. catchError(java.util.function.Consumer<java.lang.Object> function)called if an error has been signaled by one of the futures in the previous future chain.<OUT> IPromise<OUT>IPromise. catchError(java.util.function.Function<java.lang.Object,IPromise<OUT>> 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.Consumer<java.lang.Object> function)see IPromise (inheriting Callback) interface<OUT> IPromise<OUT>Promise. catchError(java.util.function.Function<java.lang.Object,IPromise<OUT>> function)see IPromise (inheriting Callback) interfacestatic IPromiseActors. complete()abbreviation for Promise creation to make code more concisestatic <T> IPromise<T>Actors. complete(T res, java.lang.Object err)abbreviation for Promise creation to make code more concise<T> IPromise<T>Actor. execInThreadPool(java.util.concurrent.Callable<T> callable)execute a callable asynchronously (in a different thread) and return a future of the result (delivered in caller thread).IPromiseActor. getReport()IPromise<Monitorable[]>Actor. getSubMonitorables()default IPromise<T>IPromise. onError(java.util.function.Consumer<java.lang.Object> errorHandler)called when an error is set as the result forwards to (new) "catchError" variant.IPromise<T>Promise. onError(java.util.function.Consumer errorHandler)see IPromise (inheriting Callback) interfacedefault IPromise<T>IPromise. onResult(java.util.function.Consumer<T> resultHandler)called when a valid result of a future becomes available.IPromise<T>Promise. onResult(java.util.function.Consumer<T> resultHandler)see IPromise (inheriting Callback) interfacedefault IPromise<T>IPromise. onTimeout(java.lang.Runnable timeoutHandler)IPromise<T>IPromise. onTimeout(java.util.function.Consumer timeoutHandler)called when the async call times out. see 'timeOutIn'IPromise<T>Promise. onTimeout(java.util.function.Consumer timeoutHandler)see IPromise (inheriting Callback) interfaceIPromiseActor. ping()can be used to wait for all messages having been processed and get a signal from the returned future once this is completestatic <T> IPromise<T>Actors. race(java.util.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 settledstatic <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 settledstatic <T> IPromise<T>Actors. reject(java.lang.Object err)abbreviation for Promise creation to make code more concisestatic IPromiseActors. resolve()abbreviation for Promise creation to make code more concisestatic <T> IPromise<T>Actors. resolve(T res)abbreviation for Promise creation to make code more conciseIPromise<java.lang.Long>Actor. router$clientPing(long tim, long[] publishedActorIds)a krouter client should ping using this method.IPromise<T>IPromise. then(java.lang.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>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>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.IPromise<T>Promise. then(java.lang.Runnable result)see IPromise interface<OUT> IPromise<OUT>Promise. then(java.util.function.Consumer<T> function)see IPromise (inheriting Callback) interfaceIPromisePromise. then(Callback resultCB)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>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.<OUT> IPromise<OUT>Promise. thenAnd(java.util.function.Function<T,IPromise<OUT>> function)see IPromise (inheriting Callback) interfaceIPromise<T>Promise. thenAnd(java.util.function.Supplier<IPromise<T>> callable)see IPromise (inheriting Callback) interfaceIPromise<T>IPromise. timeoutIn(long millis)tellMsg the future to call the onTimeout callback in N milliseconds if future is not settled until thenIPromisePromise. timeoutIn(long millis)see IPromise (inheriting Callback) interfaceMethods in org.nustaq.kontraktor that return types with arguments of type IPromise Modifier and Type Method Description static <T> IPromise<java.util.List<IPromise<T>>>Actors. all(java.util.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 settledMethods in org.nustaq.kontraktor with parameters of type IPromise Modifier and Type Method 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 settledstatic <T> java.util.stream.Stream<T>Actors. awaitAll(long timeoutMS, IPromise<T>... futures)await until all futures are settled and stream their resultsstatic <T> java.util.stream.Stream<T>Actors. awaitAll(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 settledMethod parameters in org.nustaq.kontraktor with type arguments of type IPromise Modifier and Type Method Description booleanActor. __dispatchRemoteCall(ObjectSocket objSocket, RemoteCallEntry rce, ConnectionRegistry registry, java.util.List<IPromise> createdFutures, java.lang.Object authContext, java.util.function.BiFunction<Actor,java.lang.String,java.lang.Boolean> callInterceptor, long delayCode)called if a message invokation from remote is receivedstatic <T> IPromise<IPromise<T>[]>Actors. all(int count, java.util.function.Function<java.lang.Integer,IPromise<T>> loop)static <T> IPromise<java.util.List<IPromise<T>>>Actors. all(java.util.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 settledstatic <T> IPromise<java.util.List<T>>Actors. allMapped(java.util.List<IPromise<T>> futures)similar all but map promises to their content returns a future which is settled once all promises provided are settledstatic <T> java.util.stream.Stream<T>Actors. awaitAll(long timeoutMS, java.util.List<IPromise<T>> futures)static <T> java.util.stream.Stream<T>Actors. awaitAll(java.util.List<IPromise<T>> futures)<OUT> IPromise<OUT>IPromise. catchError(java.util.function.Function<java.lang.Object,IPromise<OUT>> 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<java.lang.Object,IPromise<OUT>> function)see IPromise (inheriting Callback) interfacestatic <T> IPromise<T>Actors. race(java.util.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 settledprotected voidActor. serialOn(java.lang.Object transactionKey, java.util.function.Consumer<IPromise> toRun)enforce serial execution of asynchronous tasks.<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>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.<OUT> IPromise<OUT>Promise. thenAnd(java.util.function.Function<T,IPromise<OUT>> function)see IPromise (inheriting Callback) interfaceIPromise<T>Promise. thenAnd(java.util.function.Supplier<IPromise<T>> callable)see IPromise (inheriting Callback) interface -
Uses of IPromise in org.nustaq.kontraktor.asyncio
Methods in org.nustaq.kontraktor.asyncio that return IPromise Modifier and Type Method Description IPromise_AsyncClientSocket. connect(java.lang.String host, int port, java.util.function.BiFunction<java.nio.channels.SelectionKey,java.nio.channels.SocketChannel,AsyncSocketConnection> connectionFactory)protected IPromiseAsyncSocketConnection. directWrite(java.nio.ByteBuffer buf)IPromise<AsyncFileIOEvent>AsyncFile. read(long position, int chunkSize, java.nio.ByteBuffer target)IPromise<AsyncFileIOEvent>AsyncFile. readFully()IPromise<AsyncFileIOEvent>AsyncFile. write(long filePosition, java.nio.ByteBuffer source) -
Uses of IPromise in org.nustaq.kontraktor.impl
Classes in org.nustaq.kontraktor.impl that implement IPromise Modifier and Type Class Description classCallbackWrapper<T>If a promise or callback is wrapped by this, it will be treated correctly when remoted.Methods in org.nustaq.kontraktor.impl that return IPromise Modifier and Type Method Description IPromise<T>CallbackWrapper. awaitPromise(long timeout)<OUT> IPromise<OUT>CallbackWrapper. catchError(java.util.function.Consumer<java.lang.Object> function)<OUT> IPromise<OUT>CallbackWrapper. catchError(java.util.function.Function<java.lang.Object,IPromise<OUT>> function)IPromiseCallEntry. getFutureCB()IPromiseDispatcherThread. getReport()IPromiseSimpleScheduler. getReport()IPromise<Monitorable[]>DispatcherThread. getSubMonitorables()IPromise<Monitorable[]>SimpleScheduler. getSubMonitorables()IPromise<T>CallbackWrapper. onError(java.util.function.Consumer errorHandler)IPromise<T>CallbackWrapper. onResult(java.util.function.Consumer<T> resultHandler)Warning: this will not be called on error or timeoutIPromise<T>CallbackWrapper. onTimeout(java.util.function.Consumer timeoutHandler)IPromiseSimpleScheduler. put2QueuePolling(CallEntry e)IPromise<T>CallbackWrapper. then(java.lang.Runnable result)Warning: this will not be called on error or timeout<OUT> IPromise<OUT>CallbackWrapper. then(java.util.function.Consumer<T> function)IPromiseCallbackWrapper. then(Callback<T> result)Warning: this will not be called on error or timeout<OUT> IPromise<OUT>CallbackWrapper. thenAnd(java.util.function.Function<T,IPromise<OUT>> function)IPromise<T>CallbackWrapper. thenAnd(java.util.function.Supplier<IPromise<T>> result)IPromiseCallbackWrapper. timeoutIn(long millis)Methods in org.nustaq.kontraktor.impl with parameters of type IPromise Modifier and Type Method Description voidCallEntry. setFutureCB(IPromise futureCB)Method parameters in org.nustaq.kontraktor.impl with type arguments of type IPromise Modifier and Type Method Description <OUT> IPromise<OUT>CallbackWrapper. catchError(java.util.function.Function<java.lang.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) -
Uses of IPromise in org.nustaq.kontraktor.monitoring
Methods in org.nustaq.kontraktor.monitoring that return IPromise Modifier and Type Method Description IPromiseMonitorable. getReport()IPromise<Monitorable[]>Monitorable. getSubMonitorables() -
Uses of IPromise in org.nustaq.kontraktor.remoting
Methods in org.nustaq.kontraktor.remoting that return IPromise Modifier and Type Method Description IPromiseKConnectionPool. getConnection(ConnectableActor con) -
Uses of IPromise in org.nustaq.kontraktor.remoting.base
Methods in org.nustaq.kontraktor.remoting.base that return IPromise Modifier and Type Method Description IPromiseActorServer. close()IPromiseActorClientConnector. closeClient()IPromiseConnectionRegistry. closeNetwork()IPromiseActorServerConnector. closeServer()IPromise<T>ActorClient. connect()IPromise<T>ActorClient. connect(int qsiz)IPromise<T>ActorClient. connect(int qsiz, java.util.function.Consumer<Actor> discon)IPromiseActorClientConnector. connect(java.util.function.Function<ObjectSocket,ObjectSink> factory)default <T extends Actor>
IPromise<T>ConnectableActor. connect()default <T extends Actor>
IPromise<T>ConnectableActor. connect(Callback<ActorClientConnector> disconnectCallback)<T extends Actor>
IPromise<T>ConnectableActor. connect(Callback<ActorClientConnector> disconnectCallback, java.util.function.Consumer<Actor> actorDisconnecCB)<T extends Actor>
IPromise<T>LocalConnectable. connect(Callback<ActorClientConnector> disconnectCallback, java.util.function.Consumer<Actor> actorDisconnecCB)disconnect callback will never be called (local actor connection)default IPromise<ActorServer>ActorPublisher. publish()IPromise<ActorServer>ActorPublisher. publish(java.util.function.Consumer<Actor> disconnectCallback)IPromise<Actor>SessionResurrector. reanimate(java.lang.String sessionId, long remoteRefId)reanimate a remote ref of a resurrected facade connectionIPromiseRemoteRefPolling. scheduleSendLoop(ConnectionRegistry reg)return a future which is completed upon connection closeMethod parameters in org.nustaq.kontraktor.remoting.base with type arguments of type IPromise Modifier and Type Method Description protected booleanConnectionRegistry. processRemoteCallEntry(ObjectSocket objSocket, RemoteCallEntry response, java.util.List<IPromise> createdFutures, java.lang.Object authContext)booleanConnectionRegistry. receiveObject(ObjectSocket responseChannel, ObjectSink receiver, java.lang.Object response, java.util.List<IPromise> createdFutures, java.lang.Object authContext)process a remote call entry or an array of remote call entries.default voidObjectSink. receiveObject(java.lang.Object received, java.util.List<IPromise> createdFutures, java.lang.Object securityContext)voidObjectSink. receiveObject(ObjectSink sink, java.lang.Object received, java.util.List<IPromise> createdFutures, java.lang.Object securityContext) -
Uses of IPromise in org.nustaq.kontraktor.remoting.tcp
Methods in org.nustaq.kontraktor.remoting.tcp that return IPromise Modifier and Type Method Description IPromiseTCPClientConnector. closeClient()IPromiseNIOServerConnector. closeServer()IPromiseTCPServerConnector. closeServer()IPromiseTCPClientConnector. connect(java.util.function.Function<ObjectSocket,ObjectSink> factory)<T extends Actor>
IPromise<T>TCPConnectable. connect(Callback<ActorClientConnector> disconnectCallback, java.util.function.Consumer<Actor> actorDisconnecCB)IPromise<ActorServer>TCPNIOPublisher. publish(java.util.function.Consumer<Actor> disconnectHandler)IPromise<ActorServer>TCPPublisher. publish(java.util.function.Consumer<Actor> disconnectCallback)static IPromise<ActorServer>NIOServerConnector. Publish(Actor facade, int port, Coding coding) -
Uses of IPromise in org.nustaq.kontraktor.routers
Methods in org.nustaq.kontraktor.routers that return IPromise Modifier and Type Method Description static IPromise<java.lang.Object>Routing. connectClient(ConnectableActor connectable, java.util.function.Consumer<Actor> disconnectCallback)static IPromise<java.lang.Object>Routing. registerService(ConnectableActor connectable, Actor service, java.util.function.Consumer<Actor> disconnectCallback, boolean stateful)publish and register a service at a remote KrouterIPromise<java.lang.Long>AbstractKrouter. router$clientPing(long tim, long[] publishedActorIds)IPromiseAbstractKrouter. router$RegisterService(Actor remoteRef, boolean stateful)IPromiseHotHotFailoverKrouter. router$RegisterService(Actor remoteRef, boolean stateful)IPromiseKrouter. router$RegisterService(Actor remoteRef, boolean stateful)IPromiseSingleActiveServiceKrouter. router$RegisterService(Actor remoteRef, boolean stateful)Method parameters in org.nustaq.kontraktor.routers with type arguments of type IPromise Modifier and Type Method Description booleanAbstractKrouter. __dispatchRemoteCall(ObjectSocket objSocket, RemoteCallEntry rce, ConnectionRegistry clientRemoteRegistry, java.util.List<IPromise> createdFutures, java.lang.Object authContext, java.util.function.BiFunction<Actor,java.lang.String,java.lang.Boolean> callInterceptor, long delayCode) -
Uses of IPromise in org.nustaq.kontraktor.util
Methods in org.nustaq.kontraktor.util that return IPromise Modifier and Type Method Description IPromise<T>PromiseLatch. getPromise()IPromise<IPromise>TicketMachine. getTicket(java.lang.Object channelKey)<X> IPromise<T>[]Hoarde. map(java.util.function.BiFunction<T,java.lang.Integer,IPromise<X>> init)IPromiseHoarde. ordered(java.util.function.Function<T,IPromise> toCall)calls given function round robin. typical use: hoarde.ordered( actor -> actor.decode(byte[]) ).onResult( decodedObj -> businesslogic(decodedObj) ); afterMethods in org.nustaq.kontraktor.util that return types with arguments of type IPromise Modifier and Type Method Description IPromise<IPromise>TicketMachine. getTicket(java.lang.Object channelKey)Method parameters in org.nustaq.kontraktor.util with type arguments of type IPromise Modifier and Type Method Description <X> IPromise<T>[]Hoarde. map(java.util.function.BiFunction<T,java.lang.Integer,IPromise<X>> init)IPromiseHoarde. ordered(java.util.function.Function<T,IPromise> toCall)calls given function round robin. typical use: hoarde.ordered( actor -> actor.decode(byte[]) ).onResult( decodedObj -> businesslogic(decodedObj) ); afterConstructors in org.nustaq.kontraktor.util with parameters of type IPromise Constructor Description PromiseLatch(int counter, IPromise<T> wrapped)PromiseLatch(IPromise<T> wrapped)PromiseLatch(IPromise<T> wrapped, int counter)