- AbstractCheckedFuture<V,X extends Exception> - Class in com.diffplug.common.util.concurrent
-
- AbstractCheckedFuture(ListenableFuture<V>) - Constructor for class com.diffplug.common.util.concurrent.AbstractCheckedFuture
-
Constructs an AbstractCheckedFuture
that wraps a delegate.
- AbstractExecutionThreadService - Class in com.diffplug.common.util.concurrent
-
- AbstractExecutionThreadService() - Constructor for class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Constructor for use by subclasses.
- AbstractFuture<V> - Class in com.diffplug.common.util.concurrent
-
An abstract implementation of
ListenableFuture
, intended for advanced users only.
- AbstractFuture() - Constructor for class com.diffplug.common.util.concurrent.AbstractFuture
-
Constructor for use by subclasses.
- AbstractIdleService - Class in com.diffplug.common.util.concurrent
-
Base class for services that do not need a thread while “running” but may need one during startup and shutdown.
- AbstractIdleService() - Constructor for class com.diffplug.common.util.concurrent.AbstractIdleService
-
Constructor for use by subclasses.
- AbstractListeningExecutorService - Class in com.diffplug.common.util.concurrent
-
- AbstractListeningExecutorService() - Constructor for class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- AbstractScheduledService - Class in com.diffplug.common.util.concurrent
-
- AbstractScheduledService() - Constructor for class com.diffplug.common.util.concurrent.AbstractScheduledService
-
Constructor for use by subclasses.
- AbstractScheduledService.CustomScheduler - Class in com.diffplug.common.util.concurrent
-
- AbstractScheduledService.CustomScheduler.Schedule - Class in com.diffplug.common.util.concurrent
-
A value object that represents an absolute delay until a task should be invoked.
- AbstractScheduledService.Scheduler - Class in com.diffplug.common.util.concurrent
-
- AbstractService - Class in com.diffplug.common.util.concurrent
-
- AbstractService() - Constructor for class com.diffplug.common.util.concurrent.AbstractService
-
Constructor for use by subclasses.
- acquire() - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires a single permit from this RateLimiter
, blocking until the request can be granted.
- acquire(int) - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires the given number of permits from this RateLimiter
, blocking until the request can be granted.
- add(Runnable, Executor) - Method in class com.diffplug.common.util.concurrent.ExecutionList
-
Adds the Runnable
and accompanying Executor
to the list of listeners to execute.
- addAndGet(double) - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Atomically adds the given value to the current value.
- addAndGet(int, double) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Atomically adds the given value to the element at index i
.
- addAndGet(K, long) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Adds delta
to the value currently associated with key
, and returns the new value.
- addCallback(ListenableFuture<V>, FutureCallback<? super V>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Registers separate success and failure callbacks to be run when the
Future
’s computation is
complete or, if the computation is already complete, immediately.
- addCallback(ListenableFuture<V>, FutureCallback<? super V>, Executor) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Registers separate success and failure callbacks to be run when the
Future
’s computation is
complete or, if the computation is already complete, immediately.
- addDelayedShutdownHook(ExecutorService, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Add a shutdown hook to wait for thread completion in the given
service
.
- addListener(Service.Listener, Executor) - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- addListener(Runnable, Executor) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
Registers a listener to be
run on the given executor.
- addListener(Service.Listener, Executor) - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- addListener(Service.Listener, Executor) - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- addListener(Service.Listener, Executor) - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- addListener(Runnable, Executor) - Method in class com.diffplug.common.util.concurrent.ForwardingListenableFuture
-
- addListener(Runnable, Executor) - Method in interface com.diffplug.common.util.concurrent.ListenableFuture
-
Registers a listener to be
run on the given executor.
- addListener(Runnable, Executor) - Method in class com.diffplug.common.util.concurrent.ListenableFutureTask
-
- addListener(Service.Listener, Executor) - Method in interface com.diffplug.common.util.concurrent.Service
-
- addListener(ServiceManager.Listener, Executor) - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
- addListener(ServiceManager.Listener) - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
- allAsList(ListenableFuture<? extends V>...) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a new ListenableFuture
whose value is a list containing the values of all its input futures, if all succeed.
- allAsList(Iterable<? extends ListenableFuture<? extends V>>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a new ListenableFuture
whose value is a list containing the values of all its input futures, if all succeed.
- apply(I) - Method in interface com.diffplug.common.util.concurrent.AsyncFunction
-
Returns an output Future
to use in place of the given input
.
- asMap() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns a live, read-only view of the map backing this AtomicLongMap
.
- AsyncFunction<I,O> - Interface in com.diffplug.common.util.concurrent
-
Transforms a value, possibly asynchronously.
- AtomicDouble - Class in com.diffplug.common.util.concurrent
-
A double
value that may be updated atomically.
- AtomicDouble(double) - Constructor for class com.diffplug.common.util.concurrent.AtomicDouble
-
Creates a new AtomicDouble
with the given initial value.
- AtomicDouble() - Constructor for class com.diffplug.common.util.concurrent.AtomicDouble
-
Creates a new AtomicDouble
with initial value 0.0
.
- AtomicDoubleArray - Class in com.diffplug.common.util.concurrent
-
A double
array in which elements may be updated atomically.
- AtomicDoubleArray(int) - Constructor for class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Creates a new AtomicDoubleArray
of the given length, with all elements initially zero.
- AtomicDoubleArray(double[]) - Constructor for class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Creates a new AtomicDoubleArray
with the same length as, and all elements copied from, the given array.
- AtomicLongMap<K> - Class in com.diffplug.common.util.concurrent
-
A map containing long
values that can be atomically updated.
- Atomics - Class in com.diffplug.common.util.concurrent
-
Static utility methods pertaining to classes in the java.util.concurrent.atomic
package.
- awaitHealthy() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
- awaitHealthy(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
- awaitRunning() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- awaitRunning(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- awaitRunning() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- awaitRunning(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- awaitRunning() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- awaitRunning(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- awaitRunning() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- awaitRunning(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- awaitRunning() - Method in interface com.diffplug.common.util.concurrent.Service
-
- awaitRunning(long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.Service
-
- awaitStopped() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Waits for the all the services to reach a terminal state.
- awaitStopped(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Waits for the all the services to reach a terminal state for no more than the given time.
- awaitTerminated() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- awaitTerminated(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- awaitTerminated() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- awaitTerminated(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- awaitTerminated() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- awaitTerminated(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- awaitTerminated() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- awaitTerminated(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- awaitTerminated() - Method in interface com.diffplug.common.util.concurrent.Service
-
- awaitTerminated(long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.Service
-
- awaitTermination(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- awaitUninterruptibly(CountDownLatch) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
Invokes
latch.
await()
uninterruptibly.
- awaitUninterruptibly(CountDownLatch, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
- Callables - Class in com.diffplug.common.util.concurrent
-
Static utility methods pertaining to the
Callable
interface.
- callWithTimeout(Callable<T>, long, TimeUnit, boolean) - Method in class com.diffplug.common.util.concurrent.FakeTimeLimiter
-
- callWithTimeout(Callable<T>, long, TimeUnit, boolean) - Method in class com.diffplug.common.util.concurrent.SimpleTimeLimiter
-
- callWithTimeout(Callable<T>, long, TimeUnit, boolean) - Method in interface com.diffplug.common.util.concurrent.TimeLimiter
-
Invokes a specified Callable, timing out after the specified time limit.
- cancel(boolean) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
- cancel(boolean) - Method in class com.diffplug.common.util.concurrent.ForwardingFuture
-
- catching(ListenableFuture<? extends V>, Class<X>, Function<? super X, ? extends V>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a Future
whose result is taken from the given primary input
or, if the primary input fails with the given exceptionType
, from the result provided by the fallback
.
- catching(ListenableFuture<? extends V>, Class<X>, Function<? super X, ? extends V>, Executor) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a Future
whose result is taken from the given primary input
or, if the primary input fails with the given exceptionType
, from the result provided by the fallback
.
- catchingAsync(ListenableFuture<? extends V>, Class<X>, AsyncFunction<? super X, ? extends V>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a Future
whose result is taken from the given primary input
or, if the primary input fails with the given exceptionType
, from the result provided by the fallback
.
- catchingAsync(ListenableFuture<? extends V>, Class<X>, AsyncFunction<? super X, ? extends V>, Executor) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a Future
whose result is taken from the given primary input
or, if the primary input fails with the given exceptionType
, from the result provided by the fallback
.
- CheckedFuture<V,X extends Exception> - Interface in com.diffplug.common.util.concurrent
-
A
CheckedFuture
is a
ListenableFuture
that includes versions of the
get
methods that can throw a checked exception.
- checkedGet() - Method in class com.diffplug.common.util.concurrent.AbstractCheckedFuture
-
- checkedGet(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractCheckedFuture
-
- checkedGet() - Method in interface com.diffplug.common.util.concurrent.CheckedFuture
-
- checkedGet(long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.CheckedFuture
-
- checkedGet() - Method in class com.diffplug.common.util.concurrent.ForwardingCheckedFuture
-
- checkedGet(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ForwardingCheckedFuture
-
- clear() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Removes all of the mappings from this map.
- com.diffplug.common.util.concurrent - package com.diffplug.common.util.concurrent
-
Concurrency utilities.
- compareAndSet(double, double) - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Atomically sets the value to the given updated value if the current value is
bitwise equal to the expected value.
- compareAndSet(int, double, double) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Atomically sets the element at position
i
to the given updated value if the current value is
bitwise equal to the expected value.
- containsKey(Object) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns true if this map contains a mapping for the specified key.
- create() - Static method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Creates an AtomicLongMap
.
- create(Map<? extends K, ? extends Long>) - Static method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Creates an AtomicLongMap
with the same mappings as the specified Map
.
- create(Callable<V>) - Static method in class com.diffplug.common.util.concurrent.ListenableFutureTask
-
Creates a ListenableFutureTask
that will upon running, execute the given Callable
.
- create(Runnable, V) - Static method in class com.diffplug.common.util.concurrent.ListenableFutureTask
-
Creates a ListenableFutureTask
that will upon running, execute the given Runnable
, and arrange that get
will return the given result on successful completion.
- create(double) - Static method in class com.diffplug.common.util.concurrent.RateLimiter
-
Creates a RateLimiter
with the specified stable throughput, given as “permits per second” (commonly referred to as QPS, queries per second).
- create(double, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.RateLimiter
-
Creates a RateLimiter
with the specified stable throughput, given as “permits per second” (commonly referred to as QPS, queries per second), and a warmup period, during which the RateLimiter
smoothly ramps up its rate, until it reaches its maximum rate at the end of the period (as long as there are enough requests to saturate it).
- create() - Static method in class com.diffplug.common.util.concurrent.SettableFuture
-
Creates a new SettableFuture
in the default state.
- CustomScheduler() - Constructor for class com.diffplug.common.util.concurrent.AbstractScheduledService.CustomScheduler
-
- CycleDetectingLockFactory - Class in com.diffplug.common.util.concurrent
-
The
CycleDetectingLockFactory
creates
ReentrantLock
instances and
ReentrantReadWriteLock
instances that detect potential deadlock by checking for cycles in lock acquisition order.
- CycleDetectingLockFactory.Policies - Enum in com.diffplug.common.util.concurrent
-
- CycleDetectingLockFactory.Policy - Interface in com.diffplug.common.util.concurrent
-
Encapsulates the action to be taken when a potential deadlock is encountered.
- CycleDetectingLockFactory.PotentialDeadlockException - Exception in com.diffplug.common.util.concurrent
-
Represents a detected cycle in lock acquisition ordering.
- CycleDetectingLockFactory.WithExplicitOrdering<E extends Enum<E>> - Class in com.diffplug.common.util.concurrent
- enter() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor.
- enter(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor.
- enterIf(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if the guard is satisfied.
- enterIf(Monitor.Guard, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if the guard is satisfied.
- enterIfInterruptibly(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if the guard is satisfied.
- enterIfInterruptibly(Monitor.Guard, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if the guard is satisfied.
- enterInterruptibly() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor.
- enterInterruptibly(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor.
- enterWhen(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor when the guard is satisfied.
- enterWhen(Monitor.Guard, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor when the guard is satisfied.
- enterWhenUninterruptibly(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor when the guard is satisfied.
- enterWhenUninterruptibly(Monitor.Guard, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor when the guard is satisfied.
- execute() - Method in class com.diffplug.common.util.concurrent.ExecutionList
-
Runs this execution list, executing all existing pairs in the order they were added.
- execute(Runnable) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- ExecutionError - Error in com.diffplug.common.util.concurrent
-
- ExecutionError() - Constructor for error com.diffplug.common.util.concurrent.ExecutionError
-
Creates a new instance with null
as its detail message.
- ExecutionError(String) - Constructor for error com.diffplug.common.util.concurrent.ExecutionError
-
Creates a new instance with the given detail message.
- ExecutionError(String, Error) - Constructor for error com.diffplug.common.util.concurrent.ExecutionError
-
Creates a new instance with the given detail message and cause.
- ExecutionError(Error) - Constructor for error com.diffplug.common.util.concurrent.ExecutionError
-
Creates a new instance with the given cause.
- ExecutionList - Class in com.diffplug.common.util.concurrent
-
A support class for ListenableFuture
implementations to manage their listeners.
- ExecutionList() - Constructor for class com.diffplug.common.util.concurrent.ExecutionList
-
- executor() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Returns the
Executor
that will be used to run this service.
- executor() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
Returns the
Executor
that will be used to run this service.
- executor() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- get(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
- get() - Method in class com.diffplug.common.util.concurrent.AbstractFuture
- get() - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Gets the current value.
- get(int) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Gets the current value at position i
.
- get(K) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns the value associated with key
, or zero if there is no value associated with key
.
- get() - Method in class com.diffplug.common.util.concurrent.ForwardingFuture
-
- get(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ForwardingFuture
-
- get(Object) - Method in class com.diffplug.common.util.concurrent.Striped
-
Returns the stripe that corresponds to the passed key.
- getAndAdd(double) - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Atomically adds the given value to the current value.
- getAndAdd(int, double) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Atomically adds the given value to the element at index i
.
- getAndAdd(K, long) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Adds delta
to the value currently associated with key
, and returns the old value.
- getAndDecrement(K) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Decrements by one the value currently associated with key
, and returns the old value.
- getAndIncrement(K) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Increments by one the value currently associated with key
, and returns the old value.
- getAndSet(double) - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Atomically sets to the given value and returns the old value.
- getAndSet(int, double) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Atomically sets the element at position i
to the given value and returns the old value.
- getAt(int) - Method in class com.diffplug.common.util.concurrent.Striped
-
Returns the stripe at the specified index.
- getChecked(Future<V>, Class<X>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns the result of
Future.get()
, converting most exceptions to a new instance of the given checked exception type.
- getChecked(Future<V>, Class<X>, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns the result of
Future.get(long, TimeUnit)
, converting most exceptions to a new instance of the given checked exception type.
- getConflictingStackTrace() - Method in exception com.diffplug.common.util.concurrent.CycleDetectingLockFactory.PotentialDeadlockException
-
- getExitingExecutorService(ThreadPoolExecutor, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.
- getExitingExecutorService(ThreadPoolExecutor) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.
- getExitingScheduledExecutorService(ScheduledThreadPoolExecutor, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.
- getExitingScheduledExecutorService(ScheduledThreadPoolExecutor) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Converts the given ThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.
- getMessage() - Method in exception com.diffplug.common.util.concurrent.CycleDetectingLockFactory.PotentialDeadlockException
-
Appends the chain of messages from the conflictingStackTrace
to the original message
.
- getNextSchedule() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService.CustomScheduler
-
Calculates the time at which to next invoke the task.
- getOccupiedDepth() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns the number of times the current thread has entered this monitor in excess of the number of times it has left.
- getQueueLength() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns an estimate of the number of threads waiting to enter this monitor.
- getRate() - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Returns the stable rate (as permits per seconds
) with which this RateLimiter
is configured with.
- getUnchecked(Future<V>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns the result of calling
Future.get()
uninterruptibly on a task known not to throw a checked exception.
- getUninterruptibly(Future<V>) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
Invokes
future.
get()
uninterruptibly.
- getUninterruptibly(Future<V>, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
- getWaitQueueLength(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns an estimate of the number of threads waiting for the given guard to become satisfied.
- Guard(Monitor) - Constructor for class com.diffplug.common.util.concurrent.Monitor.Guard
-
- immediateCancelledFuture() - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a ListenableFuture
which is cancelled immediately upon construction, so that isCancelled()
always returns true
.
- immediateCheckedFuture(V) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a CheckedFuture
which has its value set immediately upon construction.
- immediateFailedCheckedFuture(X) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a CheckedFuture
which has an exception set immediately upon construction.
- immediateFailedFuture(Throwable) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a ListenableFuture
which has an exception set immediately upon construction.
- immediateFuture(V) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a ListenableFuture
which has its value set immediately upon construction.
- inCompletionOrder(Iterable<? extends ListenableFuture<? extends T>>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a list of delegate futures that correspond to the futures received in the order that they complete.
- incrementAndGet(K) - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Increments by one the value currently associated with key
, and returns the new value.
- interruptTask() - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
Subclasses can override this method to implement interruption of the future’s computation.
- intValue() - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Returns the value of this AtomicDouble
as an int
after a narrowing primitive conversion.
- invokeAll(Collection<? extends Callable<T>>) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- invokeAll(Collection<? extends Callable<T>>) - Method in interface com.diffplug.common.util.concurrent.ListeningExecutorService
- invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.ListeningExecutorService
- invokeAny(Collection<? extends Callable<T>>) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- invokeAny(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- isCancelled() - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
- isCancelled() - Method in class com.diffplug.common.util.concurrent.ForwardingFuture
-
- isDone() - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
- isDone() - Method in class com.diffplug.common.util.concurrent.ForwardingFuture
-
- isEmpty() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns true
if this map contains no key-value mappings.
- isFair() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns whether this monitor is using a fair ordering policy.
- isHealthy() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Returns true if all services are currently in the
running state.
- isOccupied() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns whether this monitor is occupied by any thread.
- isOccupiedByCurrentThread() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Returns whether the current thread is occupying this monitor (has entered more times than it has left).
- isRunning() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- isRunning() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- isRunning() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- isRunning() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- isRunning() - Method in interface com.diffplug.common.util.concurrent.Service
-
Returns
true
if this service is
running.
- isSatisfied() - Method in class com.diffplug.common.util.concurrent.Monitor.Guard
-
Evaluates this guard’s boolean condition.
- isShutdown() - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- isTerminated() - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- newDirectExecutorService() - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Creates an executor service that runs each task in the thread that invokes
execute/submit
, as in
ThreadPoolExecutor.CallerRunsPolicy
This applies both to individually submitted tasks and to collections of tasks submitted via
invokeAll
or
invokeAny
.
- newFixedDelaySchedule(long, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.AbstractScheduledService.Scheduler
-
- newFixedRateSchedule(long, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.AbstractScheduledService.Scheduler
-
- newInstance(CycleDetectingLockFactory.Policy) - Static method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
Creates a new factory with the specified policy.
- newInstanceWithExplicitOrdering(Class<E>, CycleDetectingLockFactory.Policy) - Static method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
Creates a CycleDetectingLockFactory.WithExplicitOrdering<E>
.
- newProxy(T, Class<T>, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.FakeTimeLimiter
-
- newProxy(T, Class<T>, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.SimpleTimeLimiter
-
- newProxy(T, Class<T>, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.TimeLimiter
-
Returns an instance of interfaceType
that delegates all method calls to the target
object, enforcing the specified time limit on each call.
- newReentrantLock(String) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
Equivalent to newReentrantLock(lockName, false)
.
- newReentrantLock(String, boolean) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
- newReentrantLock(E) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering
-
Equivalent to newReentrantLock(rank, false)
.
- newReentrantLock(E, boolean) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering
-
- newReentrantReadWriteLock(String) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
Equivalent to newReentrantReadWriteLock(lockName, false)
.
- newReentrantReadWriteLock(String, boolean) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory
-
- newReentrantReadWriteLock(E) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering
-
Equivalent to newReentrantReadWriteLock(rank, false)
.
- newReentrantReadWriteLock(E, boolean) - Method in class com.diffplug.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering
-
- newReference() - Static method in class com.diffplug.common.util.concurrent.Atomics
-
Creates an AtomicReference
instance with no initial value.
- newReference(V) - Static method in class com.diffplug.common.util.concurrent.Atomics
-
Creates an AtomicReference
instance with the given initial value.
- newReferenceArray(int) - Static method in class com.diffplug.common.util.concurrent.Atomics
-
Creates an AtomicReferenceArray
instance of given length.
- newReferenceArray(E[]) - Static method in class com.diffplug.common.util.concurrent.Atomics
-
Creates an AtomicReferenceArray
instance with the same length as, and all elements copied from, the given array.
- newTaskFor(Runnable, T) - Method in class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- newTaskFor(Callable<T>) - Method in class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- nonCancellationPropagating(ListenableFuture<V>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a new ListenableFuture
whose result is set from the supplied future when it completes.
- notifyFailed(Throwable) - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- notifyStarted() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
Implementing classes should invoke this method once their service has started.
- notifyStopped() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
Implementing classes should invoke this method once their service has stopped.
- Schedule(long, TimeUnit) - Constructor for class com.diffplug.common.util.concurrent.AbstractScheduledService.CustomScheduler.Schedule
-
- schedule(Runnable, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.ListeningScheduledExecutorService
-
- schedule(Callable<V>, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.ListeningScheduledExecutorService
-
- scheduleAtFixedRate(Runnable, long, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.ListeningScheduledExecutorService
-
- scheduler() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- scheduleWithFixedDelay(Runnable, long, long, TimeUnit) - Method in interface com.diffplug.common.util.concurrent.ListeningScheduledExecutorService
-
- semaphore(int, int) - Static method in class com.diffplug.common.util.concurrent.Striped
-
Creates a Striped<Semaphore>
with eagerly initialized, strongly referenced semaphores, with the specified number of permits.
- Service - Interface in com.diffplug.common.util.concurrent
-
- Service.Listener - Class in com.diffplug.common.util.concurrent
-
A listener for the various state changes that a
Service
goes through in its lifecycle.
- Service.State - Enum in com.diffplug.common.util.concurrent
-
The lifecycle states of a service.
- ServiceManager - Class in com.diffplug.common.util.concurrent
-
A manager for monitoring and controlling a set of
services.
- ServiceManager(Iterable<? extends Service>) - Constructor for class com.diffplug.common.util.concurrent.ServiceManager
-
Constructs a new instance for managing the given services.
- ServiceManager.Listener - Class in com.diffplug.common.util.concurrent
-
A listener for the aggregate state changes of the services that are under management.
- serviceName() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Returns the name of this service.
- serviceName() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
Returns the name of this service.
- serviceName() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
Returns the name of this service.
- servicesByState() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Provides a snapshot of the current state of all the services under management.
- set(V) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
Sets the result of this
Future
unless this
Future
has already been cancelled or set (including
set asynchronously).
- set(double) - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Sets to the given value.
- set(int, double) - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Sets the element at position i
to the given value.
- set(V) - Method in class com.diffplug.common.util.concurrent.SettableFuture
-
- setDaemon(boolean) - Method in class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
Sets daemon or not for new threads created with this ThreadFactory.
- setException(Throwable) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
Sets the failed result of this
Future
unless this
Future
has already been cancelled or set (including
set asynchronously).
- setException(Throwable) - Method in class com.diffplug.common.util.concurrent.SettableFuture
-
- setFuture(ListenableFuture<? extends V>) - Method in class com.diffplug.common.util.concurrent.AbstractFuture
-
Sets the result of this Future
to match the supplied input Future
once the supplied Future
is done, unless this Future
has already been cancelled or set (including “set asynchronously,” defined below).
- setFuture(ListenableFuture<? extends V>) - Method in class com.diffplug.common.util.concurrent.SettableFuture
-
- setNameFormat(String) - Method in class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
- setPriority(int) - Method in class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
Sets the priority for new threads created with this ThreadFactory.
- setRate(double) - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Updates the stable rate of this RateLimiter
, that is, the permitsPerSecond
argument provided in the factory method that constructed the RateLimiter
.
- SettableFuture<V> - Class in com.diffplug.common.util.concurrent
-
- setThreadFactory(ThreadFactory) - Method in class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
Sets the backing
ThreadFactory
for new threads created with this ThreadFactory.
- setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler) - Method in class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
- shutDown() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Stop the service.
- shutDown() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
Stop the service.
- shutDown() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
Stop the service.
- shutdown() - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- shutdownAndAwaitTermination(ExecutorService, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.MoreExecutors
-
Shuts down the given executor gradually, first disabling new submissions and later cancelling existing tasks.
- shutdownNow() - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- SimpleForwardingCheckedFuture(CheckedFuture<V, X>) - Constructor for class com.diffplug.common.util.concurrent.ForwardingCheckedFuture.SimpleForwardingCheckedFuture
-
- SimpleForwardingFuture(Future<V>) - Constructor for class com.diffplug.common.util.concurrent.ForwardingFuture.SimpleForwardingFuture
-
- SimpleForwardingListenableFuture(ListenableFuture<V>) - Constructor for class com.diffplug.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture
-
- SimpleTimeLimiter - Class in com.diffplug.common.util.concurrent
-
A TimeLimiter that runs method calls in the background using an
ExecutorService
.
- SimpleTimeLimiter(ExecutorService) - Constructor for class com.diffplug.common.util.concurrent.SimpleTimeLimiter
-
Constructs a TimeLimiter instance using the given executor service to execute proxied method calls.
- SimpleTimeLimiter() - Constructor for class com.diffplug.common.util.concurrent.SimpleTimeLimiter
-
- size() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns the number of key-value mappings in this map.
- size() - Method in class com.diffplug.common.util.concurrent.Striped
-
Returns the total number of stripes in this instance.
- sleepUninterruptibly(long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
- startAsync() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- startAsync() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- startAsync() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- startAsync() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- startAsync() - Method in interface com.diffplug.common.util.concurrent.Service
-
If the service state is
Service.State.NEW
, this initiates service startup and returns immediately.
- startAsync() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Initiates service
startup on all the services being managed.
- starting() - Method in class com.diffplug.common.util.concurrent.Service.Listener
-
Called when the service transitions from
NEW to
STARTING.
- startUp() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Start the service.
- startUp() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
Start the service.
- startUp() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
Start the service.
- startupTimes() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Returns the service load times.
- state() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- state() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- state() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- state() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- state() - Method in interface com.diffplug.common.util.concurrent.Service
-
Returns the lifecycle state of the service.
- stopAsync() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- stopAsync() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- stopAsync() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- stopAsync() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- stopAsync() - Method in interface com.diffplug.common.util.concurrent.Service
-
If the service is
starting or
running, this initiates service shutdown and returns immediately.
- stopAsync() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
Initiates service
shutdown if necessary on all the services being managed.
- stopped() - Method in class com.diffplug.common.util.concurrent.ServiceManager.Listener
-
Called when the all of the component services have reached a terminal state, either
terminated or
failed.
- stopping(Service.State) - Method in class com.diffplug.common.util.concurrent.Service.Listener
-
Called when the service transitions to the
STOPPING state.
- Striped<L> - Class in com.diffplug.common.util.concurrent
-
A striped Lock/Semaphore/ReadWriteLock
.
- submit(Runnable) - Method in class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- submit(Runnable, T) - Method in class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- submit(Callable<T>) - Method in class com.diffplug.common.util.concurrent.AbstractListeningExecutorService
-
- submit(Callable<T>) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- submit(Runnable) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- submit(Runnable, T) - Method in class com.diffplug.common.util.concurrent.ForwardingExecutorService
-
- submit(Callable<T>) - Method in class com.diffplug.common.util.concurrent.ForwardingListeningExecutorService
-
- submit(Runnable) - Method in class com.diffplug.common.util.concurrent.ForwardingListeningExecutorService
-
- submit(Runnable, T) - Method in class com.diffplug.common.util.concurrent.ForwardingListeningExecutorService
-
- submit(Callable<T>) - Method in interface com.diffplug.common.util.concurrent.ListeningExecutorService
-
- submit(Runnable) - Method in interface com.diffplug.common.util.concurrent.ListeningExecutorService
-
- submit(Runnable, T) - Method in interface com.diffplug.common.util.concurrent.ListeningExecutorService
-
- successfulAsList(ListenableFuture<? extends V>...) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a new ListenableFuture
whose value is a list containing the values of all its successful input futures.
- successfulAsList(Iterable<? extends ListenableFuture<? extends V>>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Creates a new ListenableFuture
whose value is a list containing the values of all its successful input futures.
- sum() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
Returns the sum of all values in this map.
- systemExit() - Static method in class com.diffplug.common.util.concurrent.UncaughtExceptionHandlers
-
Returns an exception handler that exits the system.
- take() - Method in class com.diffplug.common.util.concurrent.ForwardingBlockingQueue
-
- takeUninterruptibly(BlockingQueue<E>) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
Invokes
queue.
take()
uninterruptibly.
- terminated(Service.State) - Method in class com.diffplug.common.util.concurrent.Service.Listener
-
Called when the service transitions to the
TERMINATED state.
- ThreadFactoryBuilder - Class in com.diffplug.common.util.concurrent
-
- ThreadFactoryBuilder() - Constructor for class com.diffplug.common.util.concurrent.ThreadFactoryBuilder
-
- TimeLimiter - Interface in com.diffplug.common.util.concurrent
-
Produces proxies that impose a time limit on method calls to the proxied object.
- toString() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
- toString() - Method in class com.diffplug.common.util.concurrent.AbstractIdleService
-
- toString() - Method in class com.diffplug.common.util.concurrent.AbstractScheduledService
-
- toString() - Method in class com.diffplug.common.util.concurrent.AbstractService
-
- toString() - Method in class com.diffplug.common.util.concurrent.AtomicDouble
-
Returns the String representation of the current value.
- toString() - Method in class com.diffplug.common.util.concurrent.AtomicDoubleArray
-
Returns the String representation of the current values of array.
- toString() - Method in class com.diffplug.common.util.concurrent.AtomicLongMap
-
- toString() - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
- toString() - Method in class com.diffplug.common.util.concurrent.ServiceManager
-
- transform(ListenableFuture<I>, Function<? super I, ? extends O>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a new ListenableFuture
whose result is the product of applying the given Function
to the result of the given Future
.
- transform(ListenableFuture<I>, Function<? super I, ? extends O>, Executor) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a new ListenableFuture
whose result is the product of applying the given Function
to the result of the given Future
.
- transformAsync(ListenableFuture<I>, AsyncFunction<? super I, ? extends O>) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a new ListenableFuture
whose result is asynchronously derived from the result of the given Future
.
- transformAsync(ListenableFuture<I>, AsyncFunction<? super I, ? extends O>, Executor) - Static method in class com.diffplug.common.util.concurrent.Futures
-
Returns a new ListenableFuture
whose result is asynchronously derived from the result of the given Future
.
- triggerShutdown() - Method in class com.diffplug.common.util.concurrent.AbstractExecutionThreadService
-
Invoked to request the service to stop.
- tryAcquire(long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires a permit from this RateLimiter
if it can be obtained without exceeding the specified timeout
, or returns false
immediately (without waiting) if the permit would not have been granted before the timeout expired.
- tryAcquire(int) - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires permits from this
RateLimiter
if it can be acquired immediately without delay.
- tryAcquire() - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires a permit from this
RateLimiter
if it can be acquired immediately without delay.
- tryAcquire(int, long, TimeUnit) - Method in class com.diffplug.common.util.concurrent.RateLimiter
-
Acquires the given number of permits from this RateLimiter
if it can be obtained without exceeding the specified timeout
, or returns false
immediately (without waiting) if the permits would not have been granted before the timeout expired.
- tryAcquireUninterruptibly(Semaphore, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
- tryAcquireUninterruptibly(Semaphore, int, long, TimeUnit) - Static method in class com.diffplug.common.util.concurrent.Uninterruptibles
-
- tryEnter() - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if it is possible to do so immediately.
- tryEnterIf(Monitor.Guard) - Method in class com.diffplug.common.util.concurrent.Monitor
-
Enters this monitor if it is possible to do so immediately and the guard is satisfied.