Package com.apple.foundationdb.async
package com.apple.foundationdb.async
Utility functions for use within an asynchronous environment.
The data structures are designed to be compatible for use within a asynchronous environment in that they are all intended to be non-blocking. They are used within the Record Layer core library to implement some of the more advanced secondary index types.
The utility functions within the MoreAsyncUtil
class are
of a kind with the functions in the AsyncUtil
class within the
FoundationDB Java bindings. They encapsulate a few common uses of the
CompletableFuture
class.
-
ClassDescriptionAn
AsyncPeekCallbackIterator
is an extension of theAsyncPeekIterator
interface that can be given a callback to call after each time it advances.AAsyncPeekIterator
is an extension of theAsyncIterator
interface that adds peek semantics, i.e., viewing the next element of the iterator without advancing it forward.More helpers in the spirit ofAsyncUtil
.ABoolean
function that is always true.Exception that will be thrown when thesupplier
inMoreAsyncUtil.getWithDeadline(long, Supplier, ScheduledExecutorService)
fails to complete within the specified deadline time.A holder for a (mutable) value.RangeSet supports efficient adding of ranges of keys into the database to support marking work done elsewhere as completed as well as checking if specific keys are already completed.RankedSet
supports the efficient retrieval of elements by their rank as defined by lexicographic order.Configuration settings for aRankedSet
.Builder forRankedSet.Config
.Function to compute the hash used to determine which levels a key value splits on.An executor that can perform pre- and post- work in the context of the thread executing a task.