Skip navigation links
A B C D E F G I J L M N O P R S T U V W 

A

apply(Supplier<T>) - Static method in interface io.trane.future.Future
Creates a future with the result of the supplier.
apply(ExecutorService) - Static method in class io.trane.future.FuturePool
Creates a new future pool.
apply(Collection<? extends InterruptHandler>) - Static method in interface io.trane.future.InterruptHandler
Creates an interrupt handle that calls multiple handlers.
apply(InterruptHandler, InterruptHandler) - Static method in interface io.trane.future.InterruptHandler
Creates an interrupt handler that calls to other handlers.
apply() - Static method in class io.trane.future.Local
Creates a new local value.
apply(List<? extends InterruptHandler>) - Static method in class io.trane.future.Promise
Creates a promise that triggers the provided handlers in case it receives an interrupt.
apply(InterruptHandler) - Static method in class io.trane.future.Promise
Creates a promise that triggers the provided handler in case it receives an interrupt.
apply() - Static method in class io.trane.future.Promise
Creates a promise without an interrupt handler.
apply(InterruptHandler, InterruptHandler) - Static method in class io.trane.future.Promise
 
apply(Supplier<Future<T>>) - Static method in class io.trane.future.Tailrec
Runs the recursive future using the default batch size.
apply(int, Supplier<Future<T>>) - Static method in class io.trane.future.Tailrec
Runs the recursive future using the custom batch size.
async(Supplier<T>) - Method in class io.trane.future.FuturePool
Isolates the execution of the supplier on this future pool.

B

become(Future<T>) - Method in class io.trane.future.Promise
Becomes another future.
becomeIfEmpty(Future<T>) - Method in class io.trane.future.Promise
Becomes another future only if this promise is undefined.
biFlatMap(Future<U>, BiFunction<? super T, ? super U, ? extends Future<R>>) - Method in interface io.trane.future.Future
Waits for this and other (running in parallel), maps the result with f, and flattens the result.
biFlatMap(Future<U>, BiFunction<? super T, ? super U, ? extends Future<R>>) - Method in class io.trane.future.Promise
 
biMap(Future<U>, BiFunction<? super T, ? super U, ? extends R>) - Method in interface io.trane.future.Future
Waits for this and other (running in parallel) and then maps the result with f.
biMap(Future<U>, BiFunction<? super T, ? super U, ? extends R>) - Method in class io.trane.future.Promise
 

C

CheckedFutureException - Exception in io.trane.future
Wrapper exception is used to convert the checked exception into a runtime exception so it can be thrown by blocking methods like future.get.
CheckedFutureException(Throwable) - Constructor for exception io.trane.future.CheckedFutureException
 
collect(List<? extends Future<T>>) - Static method in interface io.trane.future.Future
Transforms a list of futures into a future of a list.
continuation(Continuation<T, R>) - Method in class io.trane.future.Promise
 
create(Function<Promise<T>, InterruptHandler>) - Static method in class io.trane.future.Promise
Creates a new promise using a handler builder that it’s based on the promise under creation.

D

delay(Duration, ScheduledExecutorService) - Static method in interface io.trane.future.Future
Returns a void future that is satisfied after the specified delay.
delayed(Duration, ScheduledExecutorService) - Method in interface io.trane.future.Future
Delays the result of this future.
delayed(Duration, ScheduledExecutorService) - Method in class io.trane.future.Promise
 

E

EMPTY - Static variable in class io.trane.future.Local
 
emptyList() - Static method in interface io.trane.future.Future
Returns a satisfied future with an immutable empty list.
emptyOptional() - Static method in interface io.trane.future.Future
Returns a satisfied future with an empty optional.
ensure(Runnable) - Method in interface io.trane.future.Future
Runs r when this future completes.
ensure(Runnable) - Method in class io.trane.future.Promise
 
exception(Throwable) - Static method in interface io.trane.future.Future
Creates a failed future.

F

FALSE - Static variable in interface io.trane.future.Future
A constant false future.
firstCompletedOf(List<Future<T>>) - Static method in interface io.trane.future.Future
Finds the first future that completes.
flatApply(Supplier<Future<T>>) - Static method in interface io.trane.future.Future
Applies the provided supplier and flattens the result.
flatMap(Function<? super T, ? extends Future<R>>) - Method in interface io.trane.future.Future
Maps the result of this future to another future and flattens the result.
flatMap(Function<? super T, ? extends Future<R>>) - Method in class io.trane.future.Promise
 
flatten(Future<Future<T>>) - Static method in interface io.trane.future.Future
Flattens a nested future.
Future<T> - Interface in io.trane.future
Future is an abstraction to deal with asynchronicity without having to use callbacks directly or blocking threads.
FuturePool - Class in io.trane.future
A FuturePool isolates portions of a Future composition on a separate thread pool.

G

get(Duration) - Method in interface io.trane.future.Future
Blocks the current thread until this future is satisfied and gets its result.
get() - Method in class io.trane.future.Local
Gets the current value of the local.
get(Duration) - Method in class io.trane.future.Promise
 
getInterruptHandler() - Method in class io.trane.future.Promise
 
getSavedContext() - Method in class io.trane.future.Promise
 

I

InterruptHandler - Interface in io.trane.future
Interrupts provide a way to send signals to the current pending Promise given a Future composition.
interruptible() - Method in interface io.trane.future.Future
Creates a future that will be completed with the interrupt exception if an interrupt is received.
interruptible() - Method in class io.trane.future.Promise
 
io.trane.future - package io.trane.future
 
isDefined() - Method in interface io.trane.future.Future
Checks if this future is completed.
isDefined() - Method in class io.trane.future.Promise
 
isolate(Supplier<Future<T>>) - Method in class io.trane.future.FuturePool
Isolates the execution of a future on this future pool.

J

join(List<? extends Future<T>>) - Static method in interface io.trane.future.Future
This method is similar to collect, but it discards the result of the futures.
join(Duration) - Method in interface io.trane.future.Future
Blocks the current thread until this future is satisfied.
join(Duration) - Method in class io.trane.future.Promise
 

L

let(T, Supplier<U>) - Method in class io.trane.future.Local
Executes the supplier with the provided value and then rolls back to the previous local value.
Local<T> - Class in io.trane.future
Locals are a mechanism similar to ThreadLocal but for asynchronous computations.

M

map(Function<? super T, ? extends R>) - Method in interface io.trane.future.Future
Maps the result of this future to another value.
map(Function<? super T, ? extends R>) - Method in class io.trane.future.Promise
 

N

never() - Static method in interface io.trane.future.Future
Returns a future that is never satisfied.

O

onException(Throwable) - Method in interface io.trane.future.Responder
Method called when the future completes with an exception.
onException(Throwable) - Method in interface io.trane.future.Transformer
Transformation called when the future completes with a failure.
onFailure(Consumer<Throwable>) - Method in interface io.trane.future.Future
Executes the Consumer if this future completes with an exception.
onFailure(Consumer<Throwable>) - Method in class io.trane.future.Promise
 
onSuccess(Consumer<? super T>) - Method in interface io.trane.future.Future
Executes the Consumer if this future completes successfully.
onSuccess(Consumer<? super T>) - Method in class io.trane.future.Promise
 
onValue(T) - Method in interface io.trane.future.Responder
Method called when the future completes with a value.
onValue(T) - Method in interface io.trane.future.Transformer
Transformation called when the future completes with a value.

P

Promise<T> - Class in io.trane.future
Promise is a Future that provides methods to set its result.
Promise() - Constructor for class io.trane.future.Promise
 
proxyTo(Promise<T>) - Method in interface io.trane.future.Future
Proxies the result of this future, successful or not, to a Promise.
proxyTo(Promise<T>) - Method in class io.trane.future.Promise
 

R

raise(Throwable) - Method in interface io.trane.future.InterruptHandler
Raises an interrupt.
raise(Throwable) - Method in class io.trane.future.Promise
Raises an interrupt.
rescue(Function<Throwable, ? extends Future<T>>) - Method in interface io.trane.future.Future
If this future completes with an exception, applies the provided rescue function and flattens the result.
rescue(Function<Throwable, ? extends Future<T>>) - Method in class io.trane.future.Promise
 
respond(Responder<? super T>) - Method in interface io.trane.future.Future
Executes the Responder once this future completes.
respond(Responder<? super T>) - Method in class io.trane.future.Promise
 
Responder<T> - Interface in io.trane.future
Callback to be used with future.respond.
restore(Optional<?>[]) - Static method in class io.trane.future.Local
 

S

safeFlush(Future<T>) - Method in class io.trane.future.Promise
 
save() - Static method in class io.trane.future.Local
 
selectIndex(List<Future<T>>) - Static method in interface io.trane.future.Future
Selects the index of the first satisfied future.
set(Optional<T>) - Method in class io.trane.future.Local
Sets the value of the local.
setException(Throwable) - Method in class io.trane.future.Promise
Completes this promise with a failure ex.
setValue(T) - Method in class io.trane.future.Promise
Completes this promise with value.
stackless - Static variable in exception io.trane.future.TimeoutException
 

T

Tailrec - Class in io.trane.future
Tailrec e ensures that recursive futures are stack-safe.
Tailrec() - Constructor for class io.trane.future.Tailrec
 
TimeoutException - Exception in io.trane.future
Exception thrown when a blocking operation like future.get times out.
TimeoutException() - Constructor for exception io.trane.future.TimeoutException
 
toString() - Method in class io.trane.future.Promise
 
toStringPrefix() - Method in class io.trane.future.Promise
 
transform(Transformer<? super T, ? extends R>) - Method in interface io.trane.future.Future
Maps the result of this future using the provided Transformer.
transform(Transformer<? super T, ? extends R>) - Method in class io.trane.future.Promise
 
Transformer<T,U> - Interface in io.trane.future
Interface to be used by future.transform.
transformWith(Transformer<? super T, ? extends Future<R>>) - Method in interface io.trane.future.Future
Maps the result of this future using a Transformer that returns another future and flattens the result.
transformWith(Transformer<? super T, ? extends Future<R>>) - Method in class io.trane.future.Promise
 
TRUE - Static variable in interface io.trane.future.Future
A constant true future.

U

unsafeCast() - Method in interface io.trane.future.Future
Casts the result of this future.
update(T) - Method in class io.trane.future.Local
Updates the local with the provided value.

V

value(T) - Static method in interface io.trane.future.Future
Creates a successful future.
VOID - Static variable in interface io.trane.future.Future
A constant void future.
voided() - Method in interface io.trane.future.Future
Creates a future that is satisfied with void when this future completes.
voided() - Method in class io.trane.future.Promise
 

W

whileDo(Supplier<Boolean>, Supplier<Future<T>>) - Static method in interface io.trane.future.Future
Executes the supplier function while the condition is valid.
within(Duration, ScheduledExecutorService) - Method in interface io.trane.future.Future
Creates a future that fails with a TimeoutException if this future isn’t completed within the timeout.
within(Duration, ScheduledExecutorService, Throwable) - Method in interface io.trane.future.Future
Creates a future that fails with a exception if this future isn’t completed within the timeout.
within(Duration, ScheduledExecutorService, Throwable) - Method in class io.trane.future.Promise
 
A B C D E F G I J L M N O P R S T U V W 
Skip navigation links

Copyright © 2017. All Rights Reserved.