Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/traneio/future
/ functions
Functions
693 in github.com/traneio/future
⨍
Functions
693
◇
Types & classes
65
↓ 220 callers
Method
apply
Creates a promise that triggers the provided handlers in case it receives an interrupt. @param handlers the list of handlers to be triggered. @retur
future-java/src/main/java/io/trane/future/Promise.java:38
↓ 190 callers
Method
get
Blocks the current thread until this future is satisfied and gets its result. This method normally only useful for tests, avoid it for production cod
future-java/src/main/java/io/trane/future/Future.java:525
↓ 166 callers
Method
value
Creates a successful future. @param v the value that satisfies the future. @param <T> the type of the value. @return the successful future.
future-java/src/main/java/io/trane/future/Future.java:168
↓ 96 callers
Method
setValue
Completes this promise with value. @param value the result.
future-java/src/main/java/io/trane/future/Promise.java:345
↓ 84 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/PromiseTest.java:24
↓ 56 callers
Method
map
Maps the result of this future to another value. @param f the mapping function. @return a future transformed by the mapping function.
future-java/src/main/java/io/trane/future/Future.java:395
↓ 54 callers
Method
exception
Creates a failed future. @param ex the failure. @param <T> the type of the failed future. @return the failed future.
future-java/src/main/java/io/trane/future/Future.java:179
↓ 47 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/FutureTest.java:27
↓ 42 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/WaitQueueTest.java:11
↓ 42 callers
Method
newContinuation
()
future-java/src/test/java/io/trane/future/WaitQueueTest.java:15
↓ 41 callers
Method
set
Sets the value of the local. It's similar to update but receives an optional value. @param opt optional value to set.
future-java/src/main/java/io/trane/future/Local.java:141
↓ 35 callers
Method
become
Becomes another future. This and result become the same: both are completed with the same result and both receive the same interrupt signals. @param
future-java/src/main/java/io/trane/future/Promise.java:209
↓ 34 callers
Method
raise
(final Throwable ex)
future-java/src/main/java/io/trane/future/SatisfiedFuture.java:24
↓ 33 callers
Method
add
(Continuation<T, ?> c)
future-java/src/main/java/io/trane/future/WaitQueue.java:5
↓ 28 callers
Method
continuation
(final Continuation<T, R> c)
future-java/src/main/java/io/trane/future/Promise.java:307
↓ 28 callers
Method
flatMap
Maps the result of this future to another future and flattens the result. @param f the mapping function that returns another future instance. @retur
future-java/src/main/java/io/trane/future/Future.java:403
↓ 23 callers
Method
join
This method is similar to collect, but it discards the result of the futures. It's useful to wait for a list of pending future side effects. @param l
future-java/src/main/java/io/trane/future/Future.java:275
↓ 22 callers
Method
becomeIfEmpty
Becomes another future only if this promise is undefined. This and result become the same: both are completed with the same result and both receive th
future-java/src/main/java/io/trane/future/Promise.java:223
↓ 22 callers
Method
setException
Completes this promise with a failure ex. @param ex the failure.
future-java/src/main/java/io/trane/future/Promise.java:354
↓ 21 callers
Method
hashCode
()
future-java/src/main/java/io/trane/future/ValueFuture.java:114
↓ 18 callers
Method
ensure
Runs r when this future completes. @param r the Runnable to be executed. @return a future that completes with the result of this after r is
future-java/src/main/java/io/trane/future/Future.java:455
↓ 18 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/ValueFutureTest.java:17
↓ 16 callers
Method
collect
Transforms a list of futures into a future of a list. @param list the futures to collect from @return a future that is satisfied with the futur
future-java/src/main/java/io/trane/future/Future.java:222
↓ 15 callers
Method
isDefined
Checks if this future is completed. @return true if completed, false if not completed.
future-java/src/main/java/io/trane/future/Future.java:511
↓ 14 callers
Method
update
Updates the local with the provided value. @param value value to set
future-java/src/main/java/io/trane/future/Local.java:131
↓ 13 callers
Method
getInterruptHandler
()
future-java/src/main/java/io/trane/future/Promise.java:47
↓ 13 callers
Function
n
(e)
docs/highlight.pack.js:2
↓ 13 callers
Method
toString
()
future-java/src/main/java/io/trane/future/Promise.java:851
↓ 12 callers
Method
apply
Creates a new local value. @param <T> the type of the local value. @return the local value
future-java/src/main/java/io/trane/future/Local.java:94
↓ 12 callers
Method
apply
Creates a future with the result of the supplier. Note that the supplier is executed by the current thread. Use FuturePool.async to execute the suppli
future-java/src/main/java/io/trane/future/Future.java:136
↓ 12 callers
Method
transform
Maps the result of this future using the provided Transformer. If this future completes successfully, transformer.onValue is called. If this future co
future-java/src/main/java/io/trane/future/Future.java:413
↓ 12 callers
Method
within
Creates a future that fails with a TimeoutException if this future isn't completed within the timeout. @param timeout how long to wait for the res
future-java/src/main/java/io/trane/future/Future.java:577
↓ 11 callers
Method
flush
(Future<T> result)
future-java/src/main/java/io/trane/future/WaitQueue.java:7
↓ 11 callers
Method
shutdown
()
future-java/src/test/java/io/trane/future/FuturePoolTest.java:92
↓ 11 callers
Method
verify
(final Throwable ex)
future-java/src/main/java/io/trane/future/NonFatalException.java:5
↓ 10 callers
Method
apply
Creates an interrupt handle that calls multiple handlers. @param handlers list of handlers to be called. @return the aggregate interrupt ha
future-java/src/main/java/io/trane/future/InterruptHandler.java:60
↓ 10 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/ExceptionFutureTest.java:16
↓ 10 callers
Method
selectIndex
Selects the index of the first satisfied future. @param list the list of futures to select from @return a future with the index of the first sa
future-java/src/main/java/io/trane/future/Future.java:305
↓ 9 callers
Method
delayed
Delays the result of this future. It method doesn't take in consideration how long this future takes to be completed. It assumes the state of this fut
future-java/src/main/java/io/trane/future/Future.java:558
↓ 9 callers
Method
firstCompletedOf
Finds the first future that completes. @param list futures to select from. @return a future that is satisfied with the result of the first futu
future-java/src/main/java/io/trane/future/Future.java:338
↓ 9 callers
Method
respond
Executes the Responder once this future completes. If this future completes successfully, responder.onValue is called. If this future completes with a
future-java/src/main/java/io/trane/future/Future.java:484
↓ 9 callers
Function
t
(e)
docs/highlight.pack.js:2
↓ 8 callers
Method
biFlatMap
Waits for this and other (running in parallel), maps the result with f, and flattens the result. @param other The other future that becomes the seco
future-java/src/main/java/io/trane/future/Future.java:446
↓ 8 callers
Method
biMap
Waits for this and other (running in parallel) and then maps the result with f. @param other The other future that becomes the second parameter of f
future-java/src/main/java/io/trane/future/Future.java:435
↓ 8 callers
Method
onFailure
Executes the Consumer if this future completes with an exception. @param c the Consumer to be executed. @return a future that completes with the r
future-java/src/main/java/io/trane/future/Future.java:473
↓ 8 callers
Method
proxyTo
Proxies the result of this future, successful or not, to a Promise. @param p the Promise to be updated once this future completes.
future-java/src/main/java/io/trane/future/Future.java:565
↓ 8 callers
Method
rescue
If this future completes with an exception, applies the provided rescue function and flattens the result. Note that it's possible to return a Future.
future-java/src/main/java/io/trane/future/Future.java:496
↓ 8 callers
Method
transformWith
Maps the result of this future using a Transformer that returns another future and flattens the result. If this future completes successfully, transfo
future-java/src/main/java/io/trane/future/Future.java:424
↓ 8 callers
Method
voided
Creates a future that is satisfied with void when this future completes. @return the voided future.
future-java/src/main/java/io/trane/future/Future.java:546
↓ 7 callers
Method
forward
(Promise<T> target)
future-java/src/main/java/io/trane/future/WaitQueue.java:9
↓ 7 callers
Method
onSuccess
Executes the Consumer if this future completes successfully. @param c the Consumer to be executed. @return a future that completes with the result
future-java/src/main/java/io/trane/future/Future.java:464
↓ 7 callers
Method
save
()
future-java/src/main/java/io/trane/future/Local.java:98
↓ 7 callers
Method
setValue
()
future-benchmark/src/main/java/io/trane/future/TraneIOFutureBenchmark.java:127
↓ 6 callers
Method
cas
(final Object oldState, final Object newState)
future-java/src/main/java/io/trane/future/Promise.java:199
↓ 6 callers
Method
hexHashCode
toString
future-java/src/test/java/io/trane/future/PromiseTest.java:1144
↓ 5 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/SatisfiedFutureTest.java:24
↓ 5 callers
Method
interruptible
Creates a future that will be completed with the interrupt exception if an interrupt is received. @return the interruptible future.
future-java/src/main/java/io/trane/future/Future.java:504
↓ 5 callers
Function
p
(e,n,t,r)
docs/highlight.pack.js:2
↓ 5 callers
Function
r
(e,n)
docs/highlight.pack.js:2
↓ 5 callers
Method
submit
(Callable<T> task)
future-java/src/test/java/io/trane/future/FuturePoolTest.java:116
↓ 5 callers
Method
unsafeCast
Casts the result of this future. Avoid this method since it's unsafe and can produce a future failed with a ClassCastException. @return the casted
future-java/src/main/java/io/trane/future/Future.java:601
↓ 4 callers
Method
apply
Creates a new future pool. @param executor the executor used to schedule tasks. @return the new future pool.
future-java/src/main/java/io/trane/future/FuturePool.java:47
↓ 4 callers
Method
async
Isolates the execution of the supplier on this future pool. @param s the supplier. @return a future with the result of the supplier.
future-java/src/main/java/io/trane/future/FuturePool.java:69
↓ 4 callers
Function
c
(e,r,a)
docs/highlight.pack.js:2
↓ 4 callers
Method
get
(Future<T> future)
future-java/src/test/java/io/trane/future/FuturePoolTest.java:21
↓ 4 callers
Method
objectFieldOffset
(final Class<?> cls, final String name)
future-java/src/main/java/io/trane/future/Unsafe.java:20
↓ 3 callers
Method
apply
Runs the recursive future using the default batch size. @param sup the supplier to be called on each recursion. @return the stack-safe recursive
future-java/src/main/java/io/trane/future/Tailrec.java:104
↓ 3 callers
Function
b
()
docs/highlight.pack.js:2
↓ 3 callers
Method
create
Creates a new promise using a handler builder that it's based on the promise under creation. This method allows the user to define handlers that use t
future-java/src/main/java/io/trane/future/Promise.java:135
↓ 3 callers
Method
emptyList
Returns a satisfied future with an immutable empty list. @return the empty list future. @param <T> the list type
future-java/src/main/java/io/trane/future/Future.java:202
↓ 3 callers
Function
f
(e,t,a,i)
docs/highlight.pack.js:2
↓ 3 callers
Method
getDeclaredStaticField
(final Class<?> cls, final String name)
future-java/src/main/java/io/trane/future/Unsafe.java:9
↓ 3 callers
Function
i
(e)
docs/highlight.pack.js:2
↓ 3 callers
Method
nonTailrecLoop
(Future<Integer> f)
future-java/src/test/java/io/trane/future/FutureTest.java:150
↓ 3 callers
Function
o
(e,n)
docs/highlight.pack.js:2
↓ 3 callers
Method
onException
Method called when the future completes with an exception. @param ex the failure
future-java/src/main/java/io/trane/future/Responder.java:15
↓ 3 callers
Method
onValue
Method called when the future completes with a value. @param value the value.
future-java/src/main/java/io/trane/future/Responder.java:22
↓ 3 callers
Method
raise
Raises an interrupt. @param ex the interrupt exception.
future-java/src/main/java/io/trane/future/InterruptHandler.java:86
↓ 3 callers
Method
restore
(final Optional<?>[] saved)
future-java/src/main/java/io/trane/future/Local.java:110
↓ 3 callers
Function
u
(e)
docs/highlight.pack.js:2
↓ 3 callers
Function
w
(e)
docs/highlight.pack.js:2
↓ 2 callers
Function
a
(e)
docs/highlight.pack.js:2
↓ 2 callers
Method
compress
()
future-java/src/main/java/io/trane/future/Promise.java:327
↓ 2 callers
Method
ensure
(final Runnable f)
future-java/src/main/java/io/trane/future/Promise.java:624
↓ 2 callers
Method
flatApply
Applies the provided supplier and flattens the result. This method is useful to apply a supplier safely without having to catch possible synchronous e
future-java/src/main/java/io/trane/future/Future.java:153
↓ 2 callers
Method
flatten
Flattens a nested future. The usage of this method indicates a code smell: a map may have been used instead of flatMap. There are genuine scenarios wh
future-java/src/main/java/io/trane/future/Future.java:192
↓ 2 callers
Function
g
(e,n)
docs/highlight.pack.js:2
↓ 2 callers
Function
l
(e,t)
docs/highlight.pack.js:2
↓ 2 callers
Method
let
Executes the supplier with the provided value and then rolls back to the previous local value. @param value value to be set. @param s supplier
future-java/src/main/java/io/trane/future/Local.java:182
↓ 2 callers
Method
link
(final Promise<T> target)
future-java/src/main/java/io/trane/future/Promise.java:285
↓ 2 callers
Function
m
(e,n)
docs/highlight.pack.js:2
↓ 2 callers
Method
respond
(final Responder<? super T> r)
future-java/src/main/java/io/trane/future/Promise.java:702
↓ 2 callers
Method
safeFlush
(final Future<T> result)
future-java/src/main/java/io/trane/future/Promise.java:267
↓ 2 callers
Method
submit
(final Runnable r, final int batchSize)
future-java/src/main/java/io/trane/future/Tailrec.java:77
↓ 2 callers
Method
trySetState
(final Future<T> result)
future-java/src/main/java/io/trane/future/Promise.java:237
↓ 2 callers
Function
v
(e,n)
docs/highlight.pack.js:2
↓ 1 callers
Method
compareAndSwapObject
(final Object inst, final long fieldOffset, final Object oldValue, final Object newValue)
future-java/src/main/java/io/trane/future/Unsafe.java:28
↓ 1 callers
Function
d
()
docs/highlight.pack.js:2
↓ 1 callers
Method
delay
Returns a void future that is satisfied after the specified delay. It's a shortcut for `Future.VOID.delayed(delay, scheduler)` @param delay for
future-java/src/main/java/io/trane/future/Future.java:385
↓ 1 callers
Method
emptyOptional
Returns a satisfied future with an empty optional. @return the empty optional future. @param <T> the optional type
future-java/src/main/java/io/trane/future/Future.java:212
next →
1–100 of 693, ranked by callers