@Deprecated public class Sync extends Object
| Constructor and Description | 
|---|
Sync()
Deprecated.  
  | 
| Modifier and Type | Method and Description | 
|---|---|
static <T> T | 
awaitEvent(java.util.function.Consumer<Handler<T>> consumer)
Deprecated.  
Receive a single event from a handler synchronously. 
 | 
static <T> T | 
awaitEvent(java.util.function.Consumer<Handler<T>> consumer,
          long timeout)
Deprecated.  
Receive a single event from a handler synchronously. 
 | 
static <T> T | 
awaitResult(java.util.function.Consumer<Handler<AsyncResult<T>>> consumer)
Deprecated.  
Invoke an asynchronous operation and obtain the result synchronous. 
 | 
static <T> T | 
awaitResult(java.util.function.Consumer<Handler<AsyncResult<T>>> consumer,
           long timeout)
Deprecated.  
Invoke an asynchronous operation and obtain the result synchronous. 
 | 
static <T> Handler<T> | 
fiberHandler(Handler<T> handler)
Deprecated.  
Convert a standard handler to a handler which runs on a fiber. 
 | 
static co.paralleluniverse.fibers.FiberScheduler | 
getContextScheduler()
Deprecated.  
Get the `FiberScheduler` for the current context. 
 | 
static void | 
removeContextScheduler()
Deprecated.  
Remove the scheduler for the current context 
 | 
static <T> HandlerReceiverAdaptor<T> | 
streamAdaptor()
Deprecated.  
Create an adaptor that converts a stream of events from a handler into a receiver which allows the events to be
 received synchronously. 
 | 
static <T> HandlerReceiverAdaptor<T> | 
streamAdaptor(co.paralleluniverse.strands.channels.Channel<T> channel)
Deprecated.  
Like  
streamAdaptor() but using the specified Quasar `Channel` instance. | 
@Suspendable public static <T> T awaitResult(java.util.function.Consumer<Handler<AsyncResult<T>>> consumer)
T - the type of the resultconsumer - this should encapsulate the asynchronous operation. The handler is passed to it.@Suspendable public static <T> T awaitResult(java.util.function.Consumer<Handler<AsyncResult<T>>> consumer, long timeout)
T - the type of the resultconsumer - this should encapsulate the asynchronous operation. The handler is passed to it.timeout - In milliseconds when to cancel the awaited result@Suspendable public static <T> T awaitEvent(java.util.function.Consumer<Handler<T>> consumer)
T - the type of the eventconsumer - this should encapsulate the setting of the handler to receive the event. The handler is passed to it.@Suspendable public static <T> T awaitEvent(java.util.function.Consumer<Handler<T>> consumer, long timeout)
T - the type of the eventconsumer - this should encapsulate the setting of the handler to receive the event. The handler is passed to it.timeout - In milliseconds when to cancel the awaited event@Suspendable public static <T> Handler<T> fiberHandler(Handler<T> handler)
T - the event type of the handlerhandler - the standard handler@Suspendable public static <T> HandlerReceiverAdaptor<T> streamAdaptor()
T - the type of the event@Suspendable public static <T> HandlerReceiverAdaptor<T> streamAdaptor(co.paralleluniverse.strands.channels.Channel<T> channel)
streamAdaptor() but using the specified Quasar `Channel` instance. This is useful if you want to
 fine-tune the behaviour of the adaptor.T - the type of the eventchannel - the Quasar channel@Suspendable public static co.paralleluniverse.fibers.FiberScheduler getContextScheduler()
@Suspendable public static void removeContextScheduler()
Copyright © 2023 Eclipse. All rights reserved.