Package org.onlab.util
Miscellaneous domain-agnostic utilities.
-
Interface Summary Interface Description Accumulator<T> Abstraction of an accumulator capable of collecting items and at some point in time triggers processing of all previously accumulated items.Bandwidth Representation of bandwidth.PredictableExecutor.PickyCallable<T> Callable
also implementingPredictableExecutor.PickyTask
.PredictableExecutor.PickyRunnable Runnable
also implementingPredictableExecutor.PickyTask
.PredictableExecutor.PickyTask Abstraction to give a task a way to express it's preference to run on certain thread.RichComparable<T> Extends useful methods for comparison toComparable
interface.TriConsumer<U,V,W> A consumer that accepts three arguments. -
Class Summary Class Description AbstractAccumulator<T> Base implementation of an item accumulator.BlockingAwareFuture<T> ACompletableFuture
that tracks whether the future or one of its descendants has been blocked on aCompletableFuture.get()
orCompletableFuture.join()
call.BlockingBoolean Mutable boolean that allows threads to wait for a specified value.BoundedThreadPool Implementation of ThreadPoolExecutor that bounds the work queue.ByteArraySizeHashPrinter Helper to print byte[] length and hashCode.ByteOperator Provide a set of byte operations.ClosedOpenRange Represent a closed-open range.CountDownCompleter<T> A synchronization utility that defers invocation of aconsumer
callback until a set number of actions tracked by along
counter complete.Counter Counting mechanism capable of tracking occurrences and rates.DefaultHashMap<K,V> HashMap that returns a default value for unmapped keys.ExtendedSet<E> A Set providing additional get, insertOrReplace and conditionalRemove methods.FilePathValidator Utilities for validation of Zip files.Frequency Class representing frequency.Generator<T> Generator class that yields instances of T type objects as soon as they are ready.GeoLocation Geo location specified in terms of longitude and latitude.GroupedThreadFactory Thread factory for creating threads that belong to the specified thread group.GuavaCollectors Implementations ofCollector
that implement various useful reduction operations, such as accumulating elements into Guava collections.HexDump Deprecated. in 1.11.0HexString Identifier<T> Abstract identifier backed by another value, e.g.ImmutableByteSequence Immutable sequence of bytes, assumed to represent a value inBIG_ENDIAN
order.KryoNamespace Pool of Kryo instances, with classes pre-registered.KryoNamespace.Builder KryoNamespace builder.Match<T> Utility class for checking matching values.OrderedExecutor Executor that executes tasks in order on a shared thread pool.PositionalParameterStringFormatter Allows slf4j style formatting of parameters into a string.PredictableExecutor (Somewhat) predictable ExecutorService.PredictableExecutor.PickyFutureTask<T> AFutureTask
implementingPredictableExecutor.PickyTask
.RetryingFunction<U,V> Function that retries execution on failure.SafeRecurringTask Wrapper for a recurring task which catches all exceptions to prevent task being suppressed in a ScheduledExecutorService.SharedExecutors Utility for managing a set of shared execution resources, such as a timer, single thread executor and thread pool executor for use by various parts of the platform or by applications.SharedScheduledExecutors Utility for managing a set of shared execution resources, such as a single thread scheduled executor and thread pool scheduled executor for use by various parts of the platform or by applications.SharedScheduledExecutorService A new scheduled executor service that does not eat exception.SlidingWindowCounter Maintains a sliding window of value counts.Spectrum Telecom optical wavelength bands: O, E, S, C, L and U bands.StringFilter Filters content on a given object with String representation.Timer Hashed-wheel timer singleton.Tools Miscellaneous utility methods.UnmodifiableDeque<E> Unmodifiable view of the specified Deque.XmlString PrettyPrinted XML String. -
Enum Summary Enum Description DataRateUnit Data rate unit.StringFilter.Strategy Defines the filtering strategy.Tools.LogLevel Log level for the customized logger. -
Exception Summary Exception Description Backtrace RuntimeException object intended to used to log execution back trace.ImmutableByteSequence.ByteSequenceTrimException Signals that a byte sequence cannot be trimmed.ItemNotFoundException Represents condition where an item is not found or not available.RetriesExceededException Exception that indicates the retry threshold has been exceeded.