Uses of Annotation Type
com.google.common.annotations.J2ktIncompatible
Packages that use J2ktIncompatible
Package
Description
Basic utility libraries and interfaces.
Collection interfaces and implementations, and other utilities for collections.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
Arithmetic functions operating on primitive values and on
BigInteger and BigDecimal instances.Utility methods and classes for networking (such as IP addresses and domain names).
Static utilities for the eight primitive types and
void, and value types for treating
them as unsigned or storing them in immutable arrays.Concurrency utilities.
-
Uses of J2ktIncompatible in com.google.common.base
Classes in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal classThis class provides default values for all Java types, as defined by the JLS.final classUtility methods for working withEnuminstances.classPhantom reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.interfaceImplemented by references that have code to run after garbage collection of their referents.classA reference queue with an associated background thread that dequeues references and invokesFinalizableReference.finalizeReferent()on them.classSoft reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.classWeak reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.Fields in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeFieldDescriptionstatic final CharsetCharsets.US_ASCIIDeprecated.static final CharsetCharsets.UTF_16Deprecated.UseStandardCharsets.UTF_16instead.static final CharsetCharsets.UTF_16BEDeprecated.UseStandardCharsets.UTF_16BEinstead.static final CharsetCharsets.UTF_16LEDeprecated.UseStandardCharsets.UTF_16LEinstead.Methods in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionStopwatch.elapsed()Returns the current elapsed time shown on this stopwatch as aDuration.static List<StackTraceElement> Throwables.lazyStackTrace(Throwable throwable) Deprecated.This method is equivalent toThrowable.getStackTrace()on JDK versions past JDK 8 and on all Android versions.static booleanThrowables.lazyStackTraceIsLazy()Deprecated.This method always returns false on JDK versions past JDK 8 and on all Android versions.Suppliers.memoizeWithExpiration(Supplier<T> delegate, Duration duration) Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.static RuntimeExceptionDeprecated.To preserve behavior, usethrow eorthrow new RuntimeException(e)directly, or use a combination ofThrowables.throwIfUnchecked(java.lang.Throwable)andthrow new RuntimeException(e).static <X extends Throwable>
voidThrowables.propagateIfInstanceOf(@Nullable Throwable throwable, Class<X> declaredType) Deprecated.UseThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>), which has the same behavior but rejectsnull.static voidThrowables.propagateIfPossible(@Nullable Throwable throwable) Deprecated.UseThrowables.throwIfUnchecked(java.lang.Throwable), which has the same behavior but rejectsnull.static <X extends Throwable>
voidThrowables.propagateIfPossible(@Nullable Throwable throwable, Class<X> declaredType) Deprecated.Use a combination ofThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)andThrowables.throwIfUnchecked(java.lang.Throwable), which togther provide the same behavior except that they rejectnull.Throwables.propagateIfPossible(@Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2) Deprecated.Use a combination of two calls toThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)and one call toThrowables.throwIfUnchecked(java.lang.Throwable), which togther provide the same behavior except that they rejectnull.Returns a predicate that evaluates totrueif the class being tested is assignable to (is a subtype of)clazz.Suppliers.synchronizedSupplier(Supplier<T> delegate) Returns a supplier whoseget()method synchronizes ondelegatebefore calling it, making it thread-safe. -
Uses of J2ktIncompatible in com.google.common.collect
Classes in com.google.common.collect with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal classA multiset that supports concurrent modifications and that provides atomic versions of mostMultisetoperations (exceptions where noted).final classABiMapbacked by twoEnumMapinstances.final classEnumHashBiMap<K extends Enum<K>, V extends @Nullable Object>ABiMapbacked by anEnumMapinstance for keys-to-values, and aHashMapinstance for values-to-keys.final classEnumMultiset<E extends Enum<E>>Multiset implementation specialized for enum elements, supporting all single-element operations in O(1).classDeprecated.This class has moved tocom.google.common.util.concurrent.classForwardingDeque<E extends @Nullable Object>A deque which forwards all its method calls to another deque.interfaceInterner<E>Provides similar behavior toString.intern()for any immutable type.final classContains static methods pertaining to instances ofInterner.final classA builder ofConcurrentMapinstances that can have keys or values automatically wrapped in weak references.final classMutableClassToInstanceMap<B extends @Nullable Object>A mutable class-to-instance map backed by an arbitrary user-provided map.Methods in com.google.common.collect with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionOrdering.arbitrary()Returns an arbitrary ordering over all objects, for whichcompare(a, b) == 0impliesa == b(identity equality).Sets.complementOf(Collection<E> collection) Creates anEnumSetconsisting of all enum values that are not in the specified collection.Sets.complementOf(Collection<E> collection, Class<E> type) Creates anEnumSetconsisting of all enum values that are not in the specified collection.static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.drainUninterruptibly(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue as Queues.drain(BlockingQueue, Collection, int, long, TimeUnit), but with a different behavior in case it is interrupted while waiting.static <E> intQueues.drainUninterruptibly(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue as Queues.drain(BlockingQueue, Collection, int, Duration), but with a different behavior in case it is interrupted while waiting.static ImmutableMap<String, String> Maps.fromProperties(Properties properties) Creates anImmutableMap<String, String>from aPropertiesinstance.static <E> ArrayBlockingQueue<E> Queues.newArrayBlockingQueue(int capacity) Creates an emptyArrayBlockingQueuewith the given (fixed) capacity and nonfair access policy.static <E> ConcurrentLinkedQueue<E> Queues.newConcurrentLinkedQueue()Creates an emptyConcurrentLinkedQueue.static <E> ConcurrentLinkedQueue<E> Queues.newConcurrentLinkedQueue(Iterable<? extends E> elements) Creates aConcurrentLinkedQueuecontaining the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E extends @Nullable Object>
CopyOnWriteArrayList<E> Lists.newCopyOnWriteArrayList()Creates an emptyCopyOnWriteArrayListinstance.static <E extends @Nullable Object>
CopyOnWriteArrayList<E> Lists.newCopyOnWriteArrayList(Iterable<? extends E> elements) Creates aCopyOnWriteArrayListinstance containing the given elements.static <E extends @Nullable Object>
CopyOnWriteArraySet<E> Sets.newCopyOnWriteArraySet()Creates an emptyCopyOnWriteArraySetinstance.static <E extends @Nullable Object>
CopyOnWriteArraySet<E> Sets.newCopyOnWriteArraySet(Iterable<? extends E> elements) Creates aCopyOnWriteArraySetinstance containing the given elements.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque()Creates an emptyLinkedBlockingDequewith a capacity ofInteger.MAX_VALUE.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque(int capacity) Creates an emptyLinkedBlockingDequewith the given (fixed) capacity.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque(Iterable<? extends E> elements) Creates aLinkedBlockingDequewith a capacity ofInteger.MAX_VALUE, containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E> LinkedBlockingQueue<E> Queues.newLinkedBlockingQueue()Creates an emptyLinkedBlockingQueuewith a capacity ofInteger.MAX_VALUE.static <E> LinkedBlockingQueue<E> Queues.newLinkedBlockingQueue(int capacity) Creates an emptyLinkedBlockingQueuewith the given (fixed) capacity.static <E> LinkedBlockingQueue<E> Queues.newLinkedBlockingQueue(Iterable<? extends E> elements) Creates aLinkedBlockingQueuewith a capacity ofInteger.MAX_VALUE, containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E extends Comparable>
PriorityBlockingQueue<E> Queues.newPriorityBlockingQueue()Creates an emptyPriorityBlockingQueuewith the ordering given by its elements' natural ordering.static <E extends Comparable>
PriorityBlockingQueue<E> Queues.newPriorityBlockingQueue(Iterable<? extends E> elements) Creates aPriorityBlockingQueuecontaining the given elements.static <E> SynchronousQueue<E> Queues.newSynchronousQueue()Creates an emptySynchronousQueuewith nonfair access policy.Maps.synchronizedBiMap(BiMap<K, V> bimap) Returns a synchronized (thread-safe) bimap backed by the specified bimap.Queues.synchronizedDeque(Deque<E> deque) Returns a synchronized (thread-safe) deque backed by the specified deque.static <K extends @Nullable Object, V extends @Nullable Object>
ListMultimap<K, V> Multimaps.synchronizedListMultimap(ListMultimap<K, V> multimap) Returns a synchronized (thread-safe)ListMultimapbacked by the specified multimap.Multimaps.synchronizedMultimap(Multimap<K, V> multimap) Returns a synchronized (thread-safe) multimap backed by the specified multimap.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.synchronizedNavigableMap(NavigableMap<K, V> navigableMap) Returns a synchronized (thread-safe) navigable map backed by the specified navigable map.static <E extends @Nullable Object>
NavigableSet<E> Sets.synchronizedNavigableSet(NavigableSet<E> navigableSet) Returns a synchronized (thread-safe) navigable set backed by the specified navigable set.Queues.synchronizedQueue(Queue<E> queue) Returns a synchronized (thread-safe) queue backed by the specified queue.static <K extends @Nullable Object, V extends @Nullable Object>
SetMultimap<K, V> Multimaps.synchronizedSetMultimap(SetMultimap<K, V> multimap) Returns a synchronized (thread-safe)SetMultimapbacked by the specified multimap.static <K extends @Nullable Object, V extends @Nullable Object>
SortedSetMultimap<K, V> Multimaps.synchronizedSortedSetMultimap(SortedSetMultimap<K, V> multimap) Returns a synchronized (thread-safe)SortedSetMultimapbacked by the specified multimap.static <R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object>
Table<R, C, V> Tables.synchronizedTable(Table<R, C, V> table) Returns a synchronized (thread-safe) table backed by the specified table.Object[]EvictingQueue.toArray()final Object[]ImmutableCollection.toArray()Object[]MinMaxPriorityQueue.toArray() -
Uses of J2ktIncompatible in com.google.common.io
Classes in com.google.common.io with annotations of type J2ktIncompatibleModifier and TypeInterfaceDescriptioninterfaceAn extension ofDataInputfor reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException.interfaceAn extension ofDataOutputfor writing to in-memory byte arrays; its methods offer identical functionality but do not throwIOException.interfaceByteProcessor<T extends @Nullable Object>A callback interface to process bytes from a stream.classA destination to which bytes can be written, such as a file.classA readable source of bytes, such as a file.classA destination to which characters can be written, such as a text file.classA readable source of characters, such as a text file.final classProvides utility methods for working with character streams.final classUtility methods for working withCloseableobjects.final classfinal classAnInputStreamthat counts the number of bytes read.final classAn OutputStream that counts the number of bytes written.final classAnOutputStreamthat starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.final classProvides utility methods for working with files.enumModes for opening a file for writing.final classUtility methods for working withFlushableobjects.final classException indicating that a recursive delete can't be performed because the file system does not have the support necessary to guarantee that it is not vulnerable to race conditions that would allow it to delete files and directories outside of the directory being deleted (i.e.,SecureDirectoryStreamis not supported).interfaceLineProcessor<T extends @Nullable Object>A callback to be used with the streamingreadLinesmethods.final classA class for reading lines of text.final classAn implementation ofDataInputthat uses little-endian byte ordering for readingshort,int,float,double, andlongvalues.final classAn implementation ofDataOutputthat uses little-endian byte ordering for writingchar,short,int,float,double, andlongvalues.final classfinal classFile name filter that only accepts files matching a regular expression.enumOptions for use with recursive delete methods (MoreFiles.deleteRecursively(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)andMoreFiles.deleteDirectoryContents(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)).final classProvides utility methods for working with resources in the classpath.Methods in com.google.common.io with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic longByteStreams.copy(ReadableByteChannel from, WritableByteChannel to) Copies all bytes from the readable channel to the writable channel.final ByteSourceBaseEncoding.decodingSource(CharSource encodedSource) Returns aByteSourcethat reads base-encoded bytes from the specifiedCharSource.abstract InputStreamBaseEncoding.decodingStream(Reader reader) Returns anInputStreamthat decodes base-encoded input from the specifiedReader.final ByteSinkBaseEncoding.encodingSink(CharSink encodedSink) Returns aByteSinkthat writes base-encoded bytes to the specifiedCharSink.abstract OutputStreamBaseEncoding.encodingStream(Writer writer) Returns anOutputStreamthat encodes bytes using this encoding into the specifiedWriter.static InputStreamByteStreams.limit(InputStream in, long limit) Wraps aInputStream, limiting the number of bytes which can be read.static ByteArrayDataInputByteStreams.newDataInput(byte[] bytes) Returns a newByteArrayDataInputinstance to read from thebytesarray from the beginning.static ByteArrayDataInputByteStreams.newDataInput(byte[] bytes, int start) Returns a newByteArrayDataInputinstance to read from thebytesarray, starting at the given position.static ByteArrayDataInputByteStreams.newDataInput(ByteArrayInputStream byteArrayInputStream) Returns a newByteArrayDataInputinstance to read from the givenByteArrayInputStream.static ByteArrayDataOutputByteStreams.newDataOutput()Returns a newByteArrayDataOutputinstance with a default size.static ByteArrayDataOutputByteStreams.newDataOutput(int size) Returns a newByteArrayDataOutputinstance sized to holdsizebytes before resizing.static ByteArrayDataOutputByteStreams.newDataOutput(ByteArrayOutputStream byteArrayOutputStream) Returns a newByteArrayDataOutputinstance which writes to the givenByteArrayOutputStream.ByteStreams.readBytes(InputStream input, ByteProcessor<T> processor) Process the bytes of the given input stream using the given processor. -
Uses of J2ktIncompatible in com.google.common.math
Classes in com.google.common.math with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionclassA class for arithmetic onBigDecimalthat is not covered by its built-in methods.classThe representation of a linear transformation between real numbersxandy.final classAn immutable value object capturing some basic statistics about a collection of paired double values (e.g. points on a plane).final classA mutable object which accumulates paired double values (e.g. points on a plane) and tracks some basic statistics over all the values added so far.final classProvides a fluent API for calculating quantiles.final classA bundle of statistical summary values -- sum, count, mean/average, min and max, and several forms of variance -- that were computed from a single set of zero or more floating-point values.final classA mutable object which accumulates double values and tracks some basic statistics over all the values added so far. -
Uses of J2ktIncompatible in com.google.common.net
Classes in com.google.common.net with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal classA syntactically valid host specifier, suitable for use in a URI.final classStatic utility methods pertaining toInetAddressinstances. -
Uses of J2ktIncompatible in com.google.common.primitives
Classes in com.google.common.primitives with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal classStatic utility methods pertaining tobyteprimitives that interpret values as unsigned (that is, any negative valuebis treated as the positive value256 + b).Methods in com.google.common.primitives with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionUnsignedInteger.times(UnsignedInteger val) Returns the result of multiplying this andval. -
Uses of J2ktIncompatible in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionclassBase class for services that can implementAbstractExecutionThreadService.startUp(),AbstractExecutionThreadService.run()andAbstractExecutionThreadService.shutDown()methods.classBase class for services that do not need a thread while "running" but may need one during startup and shutdown.classBase class for services that can implementAbstractScheduledService.startUp()andAbstractScheduledService.shutDown()but while in the "running" state need to perform a periodic task.classBase class for implementing services that can handleAbstractService.doStart()andAbstractService.doStop()requests, responding to them withAbstractService.notifyStarted()andAbstractService.notifyStopped()callbacks.classAdoublevalue that may be updated atomically.classAdoublearray in which elements may be updated atomically.final classClosingFuture<V extends @Nullable Object>A step in a pipeline of an asynchronous computation.classTheCycleDetectingLockFactorycreatesReentrantLockinstances andReentrantReadWriteLockinstances that detect potential deadlock by checking for cycles in lock acquisition order.final classA support class forListenableFutureimplementations to manage their listeners.final classSerializes execution of tasks, somewhat like an "asynchronoussynchronizedblock."final classA TimeLimiter implementation which actually does not attempt to limit time at all.classABlockingDequewhich forwards all its method calls to anotherBlockingDeque.classABlockingQueuewhich forwards all its method calls to anotherBlockingQueue.classAn executor service which forwards all its method calls to another executor service.classA listening executor service which forwards all its method calls to another listening executor service.final classUtilities necessary for working with libraries that supply plainFutureinstances.classListenableFutureTask<V extends @Nullable Object>AFutureTaskthat also implements theListenableFutureinterface.final classA synchronization abstraction supporting waiting on arbitrary boolean conditions.classA rate limiter.interfaceAn object with an operational state, plus asynchronousService.startAsync()andService.stopAsync()lifecycle methods to transition between states.final classA manager for monitoring and controlling a set of services.final classA TimeLimiter that runs method calls in the background using anExecutorService.classStriped<L>A stripedLock/Semaphore/ReadWriteLock.final classA ThreadFactory builder, providing any combination of these features: whether threads should be marked as daemon threads a naming format a thread priority an uncaught exception handler a backing thread factoryinterfaceImposes a time limit on method calls.final classFactories forThread.UncaughtExceptionHandlerinstances.classUnchecked version ofTimeoutException.Methods in com.google.common.util.concurrent with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, long terminationTimeout, TimeUnit timeUnit) Add a shutdown hook to wait for thread completion in the givenservice.static voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, Duration terminationTimeout) Add a shutdown hook to wait for thread completion in the givenservice.static <T extends @Nullable Object>
AsyncCallable<T> Callables.asAsyncCallable(Callable<T> callable, ListeningExecutorService listeningExecutorService) Creates anAsyncCallablefrom aCallable.default booleanListeningExecutorService.awaitTermination(Duration timeout) Duration-based overload ofExecutorService.awaitTermination(long, TimeUnit).static voidUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly with no timeout.static booleanUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor, long timeout, TimeUnit unit) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly.static booleanUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor, Duration timeout) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly.static voidUninterruptibles.awaitUninterruptibly(CountDownLatch latch) Invokeslatch.await()uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) Invokeslatch.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(CountDownLatch latch, Duration timeout) Invokeslatch.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(Condition condition, long timeout, TimeUnit unit) Invokescondition.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(Condition condition, Duration timeout) Invokescondition.await(timeout, unit)uninterruptibly.final <X extends Throwable>
FluentFuture<V> FluentFuture.catching(Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from thisFutureor, if thisFuturefails with the givenexceptionType, from the result provided by thefallback.static <V extends @Nullable Object, X extends Throwable>
ListenableFuture<V> Futures.catching(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from the given primaryinputor, if the primary input fails with the givenexceptionType, from the result provided by thefallback.final <X extends Throwable>
FluentFuture<V> FluentFuture.catchingAsync(Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from thisFutureor, if thisFuturefails with the givenexceptionType, from the result provided by thefallback.static <V extends @Nullable Object, X extends Throwable>
ListenableFuture<V> Futures.catchingAsync(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from the given primaryinputor, if the primary input fails with the givenexceptionType, from the result provided by thefallback.Futures.getChecked(Future<V> future, Class<X> exceptionClass) Returns the result ofFuture.get(), converting most exceptions to a new instance of the given checked exception type.Futures.getChecked(Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) Returns the result ofFuture.get(long, TimeUnit), converting most exceptions to a new instance of the given checked exception type.Futures.getChecked(Future<V> future, Class<X> exceptionClass, Duration timeout) Returns the result ofFuture.get(long, TimeUnit), converting most exceptions to a new instance of the given checked exception type.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.Uninterruptibles.getUninterruptibly(Future<V> future, long timeout, TimeUnit unit) Invokesfuture.get(timeout, unit)uninterruptibly.Uninterruptibles.getUninterruptibly(Future<V> future, Duration timeout) Invokesfuture.get(timeout, unit)uninterruptibly.ListeningExecutorService.invokeAll(Collection<? extends Callable<T>> tasks, Duration timeout) Duration-based overload ofListeningExecutorService.invokeAll(Collection, long, TimeUnit).ListeningExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, Duration timeout) Duration-based overload ofExecutorService.invokeAny(Collection, long, TimeUnit).static voidUninterruptibles.joinUninterruptibly(Thread toJoin) InvokestoJoin.join()uninterruptibly.static voidUninterruptibles.joinUninterruptibly(Thread toJoin, long timeout, TimeUnit unit) Invokesunit.timedJoin(toJoin, timeout)uninterruptibly.static voidUninterruptibles.joinUninterruptibly(Thread toJoin, Duration timeout) Invokesunit.timedJoin(toJoin, timeout)uninterruptibly.Futures.lazyTransform(Future<I> input, Function<? super I, ? extends O> function) LikeFutures.transform(ListenableFuture, Function, Executor)except that the transformationfunctionis invoked on each call toget()on the returned future.static ThreadFactoryMoreExecutors.platformThreadFactory()Returns a default thread factory used to create new threads.static <E> voidUninterruptibles.putUninterruptibly(BlockingQueue<E> queue, E element) Invokesqueue.put(element)uninterruptibly.default ListenableScheduledFuture<?> Duration-based overload ofListeningScheduledExecutorService.schedule(Runnable, long, TimeUnit).default <V extends @Nullable Object>
ListenableScheduledFuture<V> Duration-based overload ofListeningScheduledExecutorService.schedule(Callable, long, TimeUnit).static <O extends @Nullable Object>
ListenableFuture<O> Futures.scheduleAsync(AsyncCallable<O> callable, long delay, TimeUnit timeUnit, ScheduledExecutorService executorService) Schedulescallableon the specifiedexecutor, returning aFuture.static <O extends @Nullable Object>
ListenableFuture<O> Futures.scheduleAsync(AsyncCallable<O> callable, Duration delay, ScheduledExecutorService executorService) Schedulescallableon the specifiedexecutor, returning aFuture.default ListenableScheduledFuture<?> ListeningScheduledExecutorService.scheduleAtFixedRate(Runnable command, Duration initialDelay, Duration period) Duration-based overload ofListeningScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit).default ListenableScheduledFuture<?> ListeningScheduledExecutorService.scheduleWithFixedDelay(Runnable command, Duration initialDelay, Duration delay) Duration-based overload ofListeningScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit).static booleanMoreExecutors.shutdownAndAwaitTermination(ExecutorService service, long timeout, TimeUnit unit) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static booleanMoreExecutors.shutdownAndAwaitTermination(ExecutorService service, Duration timeout) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static voidUninterruptibles.sleepUninterruptibly(long sleepFor, TimeUnit unit) Invokesunit.sleep(sleepFor)uninterruptibly.static voidUninterruptibles.sleepUninterruptibly(Duration sleepFor) Invokesunit.sleep(sleepFor)uninterruptibly.static <E> EUninterruptibles.takeUninterruptibly(BlockingQueue<E> queue) Invokesqueue.take()uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, int permits, long timeout, TimeUnit unit) Invokessemaphore.tryAcquire(permits, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, int permits, Duration timeout) Invokessemaphore.tryAcquire(permits, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, long timeout, TimeUnit unit) Invokessemaphore.tryAcquire(1, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, Duration timeout) Invokessemaphore.tryAcquire(1, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryLockUninterruptibly(Lock lock, long timeout, TimeUnit unit) Invokeslock.tryLock(timeout, unit)uninterruptibly.static booleanUninterruptibles.tryLockUninterruptibly(Lock lock, Duration timeout) Invokeslock.tryLock(timeout, unit)uninterruptibly.final FluentFuture<V> FluentFuture.withTimeout(long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified timeout expires.final FluentFuture<V> FluentFuture.withTimeout(Duration timeout, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified timeout expires.static <V extends @Nullable Object>
ListenableFuture<V> Futures.withTimeout(ListenableFuture<V> delegate, long time, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires.static <V extends @Nullable Object>
ListenableFuture<V> Futures.withTimeout(ListenableFuture<V> delegate, Duration time, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires.
StandardCharsets.US_ASCIIinstead.