Package org.apache.bookkeeper.common.util
defines the utilities for allocator used across the project.
-
Interface Summary Interface Description Backoff.Policy Back off policy.Recyclable An interface represents an object that is recyclable.ReferenceCounted An interface for indicating an object is reference counted.SafeRunnable A runnable that catches runtime exceptions.SharedResourceManager.Resource<T> Defines a resource, and the way to create and destroy instances of it.Watcher<T> A class can implement theWatcher
interface when it wants to be informed of one-time changes in watchable objects. -
Class Summary Class Description Backoff Implements various backoff strategies.Backoff.Constant A constant backoff policy.Backoff.Exponential A exponential backoff policy.Backoff.Jitter A Jittered backoff policy.BoundedExecutorService ImplementsExecutorService
and allows limiting the number of tasks to be scheduled in the thread's queue.BoundedScheduledExecutorService ImplementsListeningScheduledExecutorService
and allows limiting the number of tasks to be scheduled in the thread's queue.ExceptionMessageHelper Utility to make it easier to add context to exception messages.ExecutorUtils Executor/Thread related utils.JsonUtil Util class which helps to parse Json to and from Object.LogExceptionRunnable A simple wrapper for aRunnable
that logs any exception thrown by it, before re-throwing it.MathUtils Provides misc math functions that don't come standard.MdcUtils Utils for work with Slf4j MDC.MemoryLimitController Controller for tracking the amount of memory used for some task.OrderedExecutor This class supports submitting tasks with an ordering key, so that tasks submitted with the same key will always be executed in order, but tasks across different keys can be unordered.OrderedExecutor.AbstractBuilder<T extends OrderedExecutor> Abstract builder class to buildOrderedScheduler
.OrderedExecutor.Builder A builder class for an OrderedExecutor.OrderedExecutor.ContextPreservingCallable<T> Decorator class for a callable that preserves MDC context.OrderedExecutor.ContextPreservingRunnable Decorator class for a runnable that preserves MDC context.OrderedScheduler This class provides supports submitting tasks with an ordering key, so that tasks submitted with the same key will always be executed in order, but tasks across different keys can be unordered.OrderedScheduler.SchedulerBuilder Builder to build ordered scheduler.ReflectionUtils General Class Reflection Utils.Retries A util class for supporting retries with customized backoff.SharedResourceManager A holder for shared resource singletons.ShutdownUtil Forked from Pulsar.SingleThreadExecutor Implements a single thread executor that drains the queue in batches to minimize contention between threads.SingleThreadSafeScheduledExecutorService StreamUtil JavaStream
related operations.Watchable<T> This class represents an watchable object, or "data" in the model-view paradigm. -
Enum Summary Enum Description Backoff.Jitter.Type Jitter type.SingleThreadExecutor.State -
Exception Summary Exception Description JsonUtil.ParseJsonException A JSON parsing exception.