Util functions used across the project.
Interface Summary Interface Description Backoff.PolicyBack off policy. RecyclableAn interface represents an object that is recyclable. ReferenceCountedAn interface for indicating an object is reference counted. SafeRunnableA 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 the
Watcherinterface when it wants to be informed of one-time changes in watchable objects.
Class Summary Class Description BackoffImplements various backoff strategies. Backoff.ConstantA constant backoff policy. Backoff.ExponentialA exponential backoff policy. Backoff.JitterA Jittered backoff policy. BoundedExecutorServiceImplements
ExecutorServiceand allows limiting the number of tasks to be scheduled in the thread's queue.
ListeningScheduledExecutorServiceand allows limiting the number of tasks to be scheduled in the thread's queue.
ExceptionMessageHelperUtility to make it easier to add context to exception messages. ExecutorUtilsExecutor/Thread related utils. JsonUtilUtil class which helps to parse Json to and from Object. LogExceptionRunnableA simple wrapper for a
Runnablethat logs any exception thrown by it, before re-throwing it.
MathUtilsProvides misc math functions that don't come standard. MdcUtilsUtils for work with Slf4j MDC. MemoryLimitControllerController for tracking the amount of memory used for some task. OrderedExecutorThis class provides 2 things over the java
OrderedExecutor.AbstractBuilder<T extends OrderedExecutor>Abstract builder class to build
OrderedExecutor.BuilderA builder class for an OrderedExecutor. OrderedExecutor.ContextPreservingCallable<T>Decorator class for a callable that preserves MDC context. OrderedExecutor.ContextPreservingRunnableDecorator class for a runnable that preserves MDC context. OrderedSchedulerThis class provides 2 things over the java
OrderedScheduler.SchedulerBuilderBuilder to build ordered scheduler. ReflectionUtilsGeneral Class Reflection Utils. RetriesA util class for supporting retries with customized backoff. SharedResourceManagerA holder for shared resource singletons. StreamUtilJava
Watchable<T>This class represents an watchable object, or "data" in the model-view paradigm.
Enum Summary Enum Description Backoff.Jitter.TypeJitter type.
Exception Summary Exception Description JsonUtil.ParseJsonExceptionA JSON parsing exception.