Uses of Class
com.google.common.annotations.GwtIncompatible
-
Packages that use GwtIncompatible Package Description com.google.common.base Basic utility libraries and interfaces.com.google.common.cache This package contains caching utilities.com.google.common.collect This package contains generic collection interfaces and implementations, and other utilities for working with collections.com.google.common.io This package contains utility methods and classes for working with Java I/O; for example input streams, output streams, readers, writers, and files.com.google.common.math Arithmetic functions operating on primitive values andBigInteger
instances.com.google.common.net This package contains utility methods and classes for working with net addresses (numeric IP and domain names).com.google.common.primitives Static utilities for working with the eight primitive types andvoid
, and value types for treating them as unsigned.com.google.common.util.concurrent Concurrency utilities. -
-
Uses of GwtIncompatible in com.google.common.base
Classes in com.google.common.base with annotations of type GwtIncompatible Modifier and Type Class Description class
Defaults
This class provides default values for all Java types, as defined by the JLS.class
Enums
Utility methods for working withEnum
instances.class
FinalizablePhantomReference<T>
Phantom reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.interface
FinalizableReference
Implemented by references that have code to run after garbage collection of their referents.class
FinalizableReferenceQueue
A reference queue with an associated background thread that dequeues references and invokesFinalizableReference.finalizeReferent()
on them.class
FinalizableSoftReference<T>
Soft reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.class
FinalizableWeakReference<T>
Weak reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.class
StandardSystemProperty
Represents a standard system property.Fields in com.google.common.base with annotations of type GwtIncompatible Modifier and Type Field Description static java.nio.charset.Charset
Charsets. US_ASCII
US-ASCII: seven-bit ASCII, the Basic Latin block of the Unicode character set (ISO646-US).static java.nio.charset.Charset
Charsets. UTF_16
UTF-16: sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark.static java.nio.charset.Charset
Charsets. UTF_16BE
UTF-16BE: sixteen-bit UCS Transformation Format, big-endian byte order.static java.nio.charset.Charset
Charsets. UTF_16LE
UTF-16LE: sixteen-bit UCS Transformation Format, little-endian byte order.Methods in com.google.common.base with annotations of type GwtIncompatible Modifier and Type Method Description static Predicate<java.lang.CharSequence>
Predicates. contains(java.util.regex.Pattern pattern)
Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.static Predicate<java.lang.CharSequence>
Predicates. containsPattern(java.lang.String pattern)
Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.java.time.Duration
Stopwatch. elapsed()
Returns the current elapsed time shown on this stopwatch as aDuration
.static <X extends java.lang.Throwable>
XThrowables. getCauseAs(java.lang.Throwable throwable, java.lang.Class<X> expectedCauseType)
Returnsthrowable
's cause, cast toexpectedCauseType
.static java.lang.reflect.Field
Enums. getField(java.lang.Enum<?> enumValue)
Returns theField
in whichenumValue
is defined.static java.lang.String
Throwables. getStackTraceAsString(java.lang.Throwable throwable)
Returns a string containing the result oftoString()
, followed by the full, recursive stack trace ofthrowable
.static <T extends @Nullable java.lang.Object>
Predicate<T>Predicates. instanceOf(java.lang.Class<?> clazz)
Returns a predicate that evaluates totrue
if the object being tested is an instance of the given class.static java.util.List<java.lang.StackTraceElement>
Throwables. lazyStackTrace(java.lang.Throwable throwable)
Deprecated.This method is equivalent toThrowable.getStackTrace()
on JDK versions past JDK 8 and on all Android versions.static boolean
Throwables. lazyStackTraceIsLazy()
Deprecated.This method always returns false on JDK versions past JDK 8 and on all Android versions.static Splitter
Splitter. on(java.util.regex.Pattern separatorPattern)
Returns a splitter that considers any subsequence matchingpattern
to be a separator.static Splitter
Splitter. onPattern(java.lang.String separatorPattern)
Returns a splitter that considers any subsequence matching a given pattern (regular expression) to be a separator.static java.lang.RuntimeException
Throwables. propagate(java.lang.Throwable throwable)
Deprecated.Usethrow e
orthrow new RuntimeException(e)
directly, or use a combination ofThrowables.throwIfUnchecked(java.lang.Throwable)
andthrow new RuntimeException(e)
.static <X extends java.lang.Throwable>
voidThrowables. propagateIfInstanceOf(java.lang.Throwable throwable, java.lang.Class<X> declaredType)
Deprecated.UseThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)
, which has the same behavior but rejectsnull
.static void
Throwables. propagateIfPossible(java.lang.Throwable throwable)
Deprecated.UseThrowables.throwIfUnchecked(java.lang.Throwable)
, which has the same behavior but rejectsnull
.static <X extends java.lang.Throwable>
voidThrowables. propagateIfPossible(java.lang.Throwable throwable, java.lang.Class<X> declaredType)
Propagatesthrowable
exactly as-is, if and only if it is an instance ofRuntimeException
,Error
, ordeclaredType
.static <X1 extends java.lang.Throwable,X2 extends java.lang.Throwable>
voidThrowables. propagateIfPossible(java.lang.Throwable throwable, java.lang.Class<X1> declaredType1, java.lang.Class<X2> declaredType2)
Propagatesthrowable
exactly as-is, if and only if it is an instance ofRuntimeException
,Error
,declaredType1
, ordeclaredType2
.static <T extends java.lang.Enum<T>>
Converter<java.lang.String,T>Enums. stringConverter(java.lang.Class<T> enumClass)
Returns a serializable converter that converts between strings andenum
values of typeenumClass
usingEnum.valueOf(Class, String)
andEnum.name()
.static Predicate<java.lang.Class<?>>
Predicates. subtypeOf(java.lang.Class<?> clazz)
Returns a predicate that evaluates totrue
if the class being tested is assignable to (is a subtype of)clazz
.static <X extends java.lang.Throwable>
voidThrowables. throwIfInstanceOf(java.lang.Throwable throwable, java.lang.Class<X> declaredType)
Throwsthrowable
if it is an instance ofdeclaredType
. -
Uses of GwtIncompatible in com.google.common.cache
Classes in com.google.common.cache with annotations of type GwtIncompatible Modifier and Type Class Description class
AbstractLoadingCache<K,V>
This class provides a skeletal implementation of theCache
interface to minimize the effort required to implement this interface.class
CacheBuilderSpec
A specification of aCacheBuilder
configuration.class
ForwardingCache<K,V>
A cache which forwards all its method calls to another cache.class
ForwardingLoadingCache<K,V>
A cache which forwards all its method calls to another cache.class
RemovalListeners
A collection of common removal listeners.Methods in com.google.common.cache with annotations of type GwtIncompatible Modifier and Type Method Description static <K,V>
CacheLoader<K,V>CacheLoader. asyncReloading(CacheLoader<K,V> loader, java.util.concurrent.Executor executor)
Returns aCacheLoader
which wrapsloader
, executing calls toCacheLoader.reload(K, V)
usingexecutor
.CacheBuilder<K,V>
CacheBuilder. expireAfterAccess(java.time.Duration duration)
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.CacheBuilder<K,V>
CacheBuilder. expireAfterWrite(java.time.Duration duration)
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.static CacheBuilder<java.lang.Object,java.lang.Object>
CacheBuilder. from(CacheBuilderSpec spec)
Constructs a newCacheBuilder
instance with the settings specified inspec
.static CacheBuilder<java.lang.Object,java.lang.Object>
CacheBuilder. from(java.lang.String spec)
Constructs a newCacheBuilder
instance with the settings specified inspec
.CacheBuilder<K,V>
CacheBuilder. maximumWeight(long maximumWeight)
Specifies the maximum weight of entries the cache may contain.CacheBuilder<K,V>
CacheBuilder. refreshAfterWrite(long duration, java.util.concurrent.TimeUnit unit)
Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.CacheBuilder<K,V>
CacheBuilder. refreshAfterWrite(java.time.Duration duration)
Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.ListenableFuture<V>
CacheLoader. reload(K key, V oldValue)
Computes or retrieves a replacement value corresponding to an already-cachedkey
.CacheBuilder<K,V>
CacheBuilder. softValues()
Specifies that each value (not key) stored in the cache should be wrapped in aSoftReference
(by default, strong references are used).CacheBuilder<K,V>
CacheBuilder. weakKeys()
Specifies that each key (not value) stored in the cache should be wrapped in aWeakReference
(by default, strong references are used).CacheBuilder<K,V>
CacheBuilder. weakValues()
Specifies that each value (not key) stored in the cache should be wrapped in aWeakReference
(by default, strong references are used).<K1 extends K,V1 extends V>
CacheBuilder<K1,V1>CacheBuilder. weigher(Weigher<? super K1,? super V1> weigher)
Specifies the weigher to use in determining the weight of entries. -
Uses of GwtIncompatible in com.google.common.collect
Classes in com.google.common.collect with annotations of type GwtIncompatible Modifier and Type Class Description class
ConcurrentHashMultiset<E>
A multiset that supports concurrent modifications and that provides atomic versions of mostMultiset
operations (exceptions where noted).class
ForwardingBlockingDeque<E>
Deprecated.This class has moved tocom.google.common.util.concurrent
.class
ForwardingDeque<E extends @Nullable java.lang.Object>
A deque which forwards all its method calls to another deque.class
ForwardingNavigableMap<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
A navigable map which forwards all its method calls to another navigable map.class
ForwardingNavigableSet<E extends @Nullable java.lang.Object>
A navigable set which forwards all its method calls to another navigable set.class
ImmutableClassToInstanceMap<B>
AClassToInstanceMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ImmutableRangeMap<K extends java.lang.Comparable<?>,V>
ARangeMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ImmutableRangeSet<C extends java.lang.Comparable>
ARangeSet
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ImmutableSortedMultiset<E>
ASortedMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.interface
Interner<E>
Provides similar behavior toString.intern()
for any immutable type.class
Interners
Contains static methods pertaining to instances ofInterner
.class
MutableClassToInstanceMap<B extends @Nullable java.lang.Object>
A mutable class-to-instance map backed by an arbitrary user-provided map.interface
RangeMap<K extends java.lang.Comparable,V>
A mapping from disjoint nonempty ranges to non-null values.interface
RangeSet<C extends java.lang.Comparable>
class
TreeRangeMap<K extends java.lang.Comparable,V>
An implementation ofRangeMap
based on aTreeMap
, supporting all optional operations.class
TreeRangeSet<C extends java.lang.Comparable<?>>
An implementation ofRangeSet
backed by aTreeMap
.Methods in com.google.common.collect with annotations of type GwtIncompatible Modifier and Type Method Description static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. asMap(java.util.NavigableSet<K> set, Function<? super K,V> function)
Returns a view of the navigable set as a map, mapping keys from the set according to the specified function.static <E extends java.lang.Enum<E>>
java.util.EnumSet<E>Sets. complementOf(java.util.Collection<E> collection)
Creates anEnumSet
consisting of all enum values that are not in the specified collection.static <E extends java.lang.Enum<E>>
java.util.EnumSet<E>Sets. complementOf(java.util.Collection<E> collection, java.lang.Class<E> type)
Creates anEnumSet
consisting of all enum values that are not in the specified collection.static <T> T[]
ObjectArrays. concat(T[] first, T[] second, java.lang.Class<T> type)
Returns a new array that contains the concatenated contents of two arrays.abstract UnmodifiableIterator<E>
ImmutableSortedSet. descendingIterator()
ImmutableSortedSet<E>
ImmutableSortedSet. descendingSet()
static <E> int
Queues. drain(java.util.concurrent.BlockingQueue<E> q, java.util.Collection<? super E> buffer, int numElements, long timeout, java.util.concurrent.TimeUnit unit)
Drains the queue asBlockingQueue.drainTo(Collection, int)
, but if the requestednumElements
elements are not available, it will wait for them up to the specified timeout.static <E> int
Queues. drain(java.util.concurrent.BlockingQueue<E> q, java.util.Collection<? super E> buffer, int numElements, java.time.Duration timeout)
Drains the queue asBlockingQueue.drainTo(Collection, int)
, but if the requestednumElements
elements are not available, it will wait for them up to the specified timeout.static <E> int
Queues. drainUninterruptibly(java.util.concurrent.BlockingQueue<E> q, java.util.Collection<? super E> buffer, int numElements, long timeout, java.util.concurrent.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> int
Queues. drainUninterruptibly(java.util.concurrent.BlockingQueue<E> q, java.util.Collection<? super E> buffer, int numElements, java.time.Duration timeout)
Drains the queue as Queues.drain(BlockingQueue, Collection, int, Duration), but with a different behavior in case it is interrupted while waiting.<T> FluentIterable<T>
FluentIterable. filter(java.lang.Class<T> type)
Returns the elements from this fluent iterable that are instances of classtype
.static <T> java.lang.Iterable<T>
Iterables. filter(java.lang.Iterable<?> unfiltered, java.lang.Class<T> desiredType)
Returns a view ofunfiltered
containing all elements that are of the typedesiredType
.static <T> UnmodifiableIterator<T>
Iterators. filter(java.util.Iterator<?> unfiltered, java.lang.Class<T> desiredType)
Returns a view ofunfiltered
containing all elements that are of the typedesiredType
.static <E extends @Nullable java.lang.Object>
java.util.NavigableSet<E>Sets. filter(java.util.NavigableSet<E> unfiltered, Predicate<? super E> predicate)
Returns the elements of aNavigableSet
,unfiltered
, that satisfy a predicate.static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. filterEntries(java.util.NavigableMap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a sorted map containing the mappings inunfiltered
that satisfy a predicate.static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. filterKeys(java.util.NavigableMap<K,V> unfiltered, Predicate<? super K> keyPredicate)
Returns a navigable map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. filterValues(java.util.NavigableMap<K,V> unfiltered, Predicate<? super V> valuePredicate)
Returns a navigable map containing the mappings inunfiltered
whose values satisfy a predicate.static ImmutableMap<java.lang.String,java.lang.String>
Maps. fromProperties(java.util.Properties properties)
Creates anImmutableMap<String, String>
from aProperties
instance.java.util.NavigableSet<V>
TreeMultimap. get(K key)
ContiguousSet<C>
ContiguousSet. headSet(C toElement, boolean inclusive)
E
ImmutableSortedSet. higher(E e)
java.lang.Class<K>
EnumBiMap. keyType()
Returns the associated key type.java.lang.Class<K>
EnumHashBiMap. keyType()
Returns the associated key type.E
ImmutableSortedSet. lower(E e)
static <T> T[]
ObjectArrays. newArray(java.lang.Class<T> type, int length)
Returns a new array of the given length with the specified component type.static <E> java.util.concurrent.ArrayBlockingQueue<E>
Queues. newArrayBlockingQueue(int capacity)
Creates an emptyArrayBlockingQueue
with the given (fixed) capacity and nonfair access policy.static <E> java.util.concurrent.ConcurrentLinkedQueue<E>
Queues. newConcurrentLinkedQueue()
Creates an emptyConcurrentLinkedQueue
.static <E> java.util.concurrent.ConcurrentLinkedQueue<E>
Queues. newConcurrentLinkedQueue(java.lang.Iterable<? extends E> elements)
Creates aConcurrentLinkedQueue
containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E extends @Nullable java.lang.Object>
java.util.concurrent.CopyOnWriteArrayList<E>Lists. newCopyOnWriteArrayList()
Creates an emptyCopyOnWriteArrayList
instance.static <E extends @Nullable java.lang.Object>
java.util.concurrent.CopyOnWriteArrayList<E>Lists. newCopyOnWriteArrayList(java.lang.Iterable<? extends E> elements)
Creates aCopyOnWriteArrayList
instance containing the given elements.static <E extends @Nullable java.lang.Object>
java.util.concurrent.CopyOnWriteArraySet<E>Sets. newCopyOnWriteArraySet()
Creates an emptyCopyOnWriteArraySet
instance.static <E extends @Nullable java.lang.Object>
java.util.concurrent.CopyOnWriteArraySet<E>Sets. newCopyOnWriteArraySet(java.lang.Iterable<? extends E> elements)
Creates aCopyOnWriteArraySet
instance containing the given elements.static <E> java.util.concurrent.LinkedBlockingDeque<E>
Queues. newLinkedBlockingDeque()
Creates an emptyLinkedBlockingDeque
with a capacity ofInteger.MAX_VALUE
.static <E> java.util.concurrent.LinkedBlockingDeque<E>
Queues. newLinkedBlockingDeque(int capacity)
Creates an emptyLinkedBlockingDeque
with the given (fixed) capacity.static <E> java.util.concurrent.LinkedBlockingDeque<E>
Queues. newLinkedBlockingDeque(java.lang.Iterable<? extends E> elements)
Creates aLinkedBlockingDeque
with 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> java.util.concurrent.LinkedBlockingQueue<E>
Queues. newLinkedBlockingQueue()
Creates an emptyLinkedBlockingQueue
with a capacity ofInteger.MAX_VALUE
.static <E> java.util.concurrent.LinkedBlockingQueue<E>
Queues. newLinkedBlockingQueue(int capacity)
Creates an emptyLinkedBlockingQueue
with the given (fixed) capacity.static <E> java.util.concurrent.LinkedBlockingQueue<E>
Queues. newLinkedBlockingQueue(java.lang.Iterable<? extends E> elements)
Creates aLinkedBlockingQueue
with 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 java.lang.Comparable>
java.util.concurrent.PriorityBlockingQueue<E>Queues. newPriorityBlockingQueue()
Creates an emptyPriorityBlockingQueue
with the ordering given by its elements' natural ordering.static <E extends java.lang.Comparable>
java.util.concurrent.PriorityBlockingQueue<E>Queues. newPriorityBlockingQueue(java.lang.Iterable<? extends E> elements)
Creates aPriorityBlockingQueue
containing the given elements.static <E> java.util.concurrent.SynchronousQueue<E>
Queues. newSynchronousQueue()
Creates an emptySynchronousQueue
with nonfair access policy.static <E> Interner<E>
Interners. newWeakInterner()
Returns a new thread-safe interner which retains a weak reference to each instance it has interned, and so does not prevent these instances from being garbage-collected.E
ImmutableSortedSet. pollFirst()
Deprecated.Unsupported operation.E
ImmutableSortedSet. pollLast()
Deprecated.Unsupported operation.static <K extends java.lang.Comparable<? super K>,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. subMap(java.util.NavigableMap<K,V> map, Range<K> range)
Returns a view of the portion ofmap
whose keys are contained byrange
.ContiguousSet<C>
ContiguousSet. subSet(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)
ImmutableSortedSet<E>
ImmutableSortedSet. subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
static <K extends java.lang.Comparable<? super K>>
java.util.NavigableSet<K>Sets. subSet(java.util.NavigableSet<K> set, Range<K> range)
Returns a view of the portion ofset
whose elements are contained byrange
.static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. synchronizedNavigableMap(java.util.NavigableMap<K,V> navigableMap)
Returns a synchronized (thread-safe) navigable map backed by the specified navigable map.static <E extends @Nullable java.lang.Object>
java.util.NavigableSet<E>Sets. synchronizedNavigableSet(java.util.NavigableSet<E> navigableSet)
Returns a synchronized (thread-safe) navigable set backed by the specified navigable set.ContiguousSet<C>
ContiguousSet. tailSet(C fromElement, boolean inclusive)
@Nullable V[][]
ArrayTable. toArray(java.lang.Class<V> valueClass)
Returns a two-dimensional array with the table contents.@Nullable E[]
FluentIterable. toArray(java.lang.Class<@NonNull E> type)
Returns an array containing all of the elements from this fluent iterable in iteration order.static <T> @Nullable T[]
Iterables. toArray(java.lang.Iterable<? extends @Nullable T> iterable, java.lang.Class<T> type)
Copies an iterable's elements into an array.static <T> @Nullable T[]
Iterators. toArray(java.util.Iterator<? extends @Nullable T> iterator, java.lang.Class<T> type)
Copies an iterator's elements into an array.static <K extends @Nullable java.lang.Object,V1 extends @Nullable java.lang.Object,V2 extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V2>Maps. transformEntries(java.util.NavigableMap<K,V1> fromMap, Maps.EntryTransformer<? super K,? super V1,V2> transformer)
Returns a view of a navigable map whose values are derived from the original navigable map's entries.static <K extends @Nullable java.lang.Object,V1 extends @Nullable java.lang.Object,V2 extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V2>Maps. transformValues(java.util.NavigableMap<K,V1> fromMap, Function<? super V1,V2> function)
Returns a view of a navigable map where each value is transformed by a function.static <K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
java.util.NavigableMap<K,V>Maps. unmodifiableNavigableMap(java.util.NavigableMap<K,? extends V> map)
Returns an unmodifiable view of the specified navigable map.java.lang.Class<V>
EnumBiMap. valueType()
Returns the associated value type.Interners.InternerBuilder
Interners.InternerBuilder. weak()
Instructs theInterners.InternerBuilder
to build a weak interner.MapMaker
MapMaker. weakKeys()
Specifies that each key (not value) stored in the map should be wrapped in aWeakReference
(by default, strong references are used).MapMaker
MapMaker. weakValues()
Specifies that each value (not key) stored in the map should be wrapped in aWeakReference
(by default, strong references are used). -
Uses of GwtIncompatible in com.google.common.io
Classes in com.google.common.io with annotations of type GwtIncompatible Modifier and Type Interface Description interface
ByteArrayDataInput
An extension ofDataInput
for reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException
.interface
ByteArrayDataOutput
An extension ofDataOutput
for writing to in-memory byte arrays; its methods offer identical functionality but do not throwIOException
.interface
ByteProcessor<T extends @Nullable java.lang.Object>
A callback interface to process bytes from a stream.class
ByteSink
A destination to which bytes can be written, such as a file.class
ByteSource
A readable source of bytes, such as a file.class
ByteStreams
Provides utility methods for working with byte arrays and I/O streams.class
CharSink
A destination to which characters can be written, such as a text file.class
CharSource
A readable source of characters, such as a text file.class
CharStreams
Provides utility methods for working with character streams.class
Closeables
Utility methods for working withCloseable
objects.class
Closer
class
CountingInputStream
AnInputStream
that counts the number of bytes read.class
CountingOutputStream
An OutputStream that counts the number of bytes written.class
FileBackedOutputStream
AnOutputStream
that starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.class
Files
Provides utility methods for working with files.class
FileWriteMode
Modes for opening a file for writing.class
Flushables
Utility methods for working withFlushable
objects.class
InsecureRecursiveDeleteException
Exception 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.,SecureDirectoryStream
is not supported).interface
LineProcessor<T extends @Nullable java.lang.Object>
A callback to be used with the streamingreadLines
methods.class
LineReader
A class for reading lines of text.class
LittleEndianDataInputStream
An implementation ofDataInput
that uses little-endian byte ordering for readingshort
,int
,float
,double
, andlong
values.class
LittleEndianDataOutputStream
An implementation ofDataOutput
that uses little-endian byte ordering for writingchar
,short
,int
,float
,double
, andlong
values.class
MoreFiles
Static utilities for use withPath
instances, intended to complementFiles
.class
PatternFilenameFilter
File name filter that only accepts files matching a regular expression.class
RecursiveDeleteOption
Options 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...)
).class
Resources
Provides utility methods for working with resources in the classpath.Methods in com.google.common.io with annotations of type GwtIncompatible Modifier and Type Method Description ByteSource
BaseEncoding. decodingSource(CharSource encodedSource)
Returns aByteSource
that reads base-encoded bytes from the specifiedCharSource
.abstract java.io.InputStream
BaseEncoding. decodingStream(java.io.Reader reader)
Returns anInputStream
that decodes base-encoded input from the specifiedReader
.ByteSink
BaseEncoding. encodingSink(CharSink encodedSink)
Returns aByteSink
that writes base-encoded bytes to the specifiedCharSink
.abstract java.io.OutputStream
BaseEncoding. encodingStream(java.io.Writer writer)
Returns anOutputStream
that encodes bytes using this encoding into the specifiedWriter
. -
Uses of GwtIncompatible in com.google.common.math
Classes in com.google.common.math with annotations of type GwtIncompatible Modifier and Type Class Description class
BigDecimalMath
A class for arithmetic onBigDecimal
that is not covered by its built-in methods.class
LinearTransformation
The representation of a linear transformation between real numbersx
andy
.class
PairedStats
An immutable value object capturing some basic statistics about a collection of paired double values (e.g.class
PairedStatsAccumulator
A mutable object which accumulates paired double values (e.g.class
Quantiles
Provides a fluent API for calculating quantiles.class
Stats
A 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.class
StatsAccumulator
A mutable object which accumulates double values and tracks some basic statistics over all the values added so far.Methods in com.google.common.math with annotations of type GwtIncompatible Modifier and Type Method Description static long
LongMath. checkedPow(long b, int k)
Returns theb
to thek
th power, provided it does not overflow.static long
LongMath. checkedSubtract(long a, long b)
Returns the difference ofa
andb
, provided it does not overflow.static java.math.BigInteger
BigIntegerMath. divide(java.math.BigInteger p, java.math.BigInteger q, java.math.RoundingMode mode)
Returns the result of dividingp
byq
, rounding using the specifiedRoundingMode
.static long
LongMath. divide(long p, long q, java.math.RoundingMode mode)
Returns the result of dividingp
byq
, rounding using the specifiedRoundingMode
.static long
LongMath. factorial(int n)
Returnsn!
, that is, the product of the firstn
positive integers,1
ifn == 0
, orLong.MAX_VALUE
if the result does not fit in along
.static boolean
DoubleMath. isMathematicalInteger(double x)
Returnstrue
ifx
represents a mathematical integer.static boolean
DoubleMath. isPowerOfTwo(double x)
Returnstrue
ifx
is exactly equal to2^k
for some finite integerk
.static boolean
IntMath. isPrime(int n)
Returnstrue
ifn
is a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static boolean
LongMath. isPrime(long n)
Returnstrue
ifn
is a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static int
BigIntegerMath. log10(java.math.BigInteger x, java.math.RoundingMode mode)
Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.static int
IntMath. log10(int x, java.math.RoundingMode mode)
Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.static int
LongMath. log10(long x, java.math.RoundingMode mode)
Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.static int
DoubleMath. log2(double x, java.math.RoundingMode mode)
Returns the base 2 logarithm of a double value, rounded with the specified rounding mode to anint
.static double
DoubleMath. mean(double... values)
Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static double
DoubleMath. mean(java.lang.Iterable<? extends java.lang.Number> values)
Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static double
DoubleMath. mean(java.util.Iterator<? extends java.lang.Number> values)
Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static int
LongMath. mod(long x, int m)
Returnsx mod m
, a non-negative value less thanm
.static long
LongMath. mod(long x, long m)
Returnsx mod m
, a non-negative value less thanm
.static int
IntMath. pow(int b, int k)
Returnsb
to thek
th power.static long
LongMath. pow(long b, int k)
Returnsb
to thek
th power.static java.math.BigInteger
DoubleMath. roundToBigInteger(double x, java.math.RoundingMode mode)
Returns theBigInteger
value that is equal tox
rounded with the specified rounding mode, if possible.static double
BigIntegerMath. roundToDouble(java.math.BigInteger x, java.math.RoundingMode mode)
Returnsx
, rounded to adouble
with the specified rounding mode.static double
LongMath. roundToDouble(long x, java.math.RoundingMode mode)
Returnsx
, rounded to adouble
with the specified rounding mode.static int
DoubleMath. roundToInt(double x, java.math.RoundingMode mode)
Returns theint
value that is equal tox
rounded with the specified rounding mode, if possible.static long
DoubleMath. roundToLong(double x, java.math.RoundingMode mode)
Returns thelong
value that is equal tox
rounded with the specified rounding mode, if possible.static java.math.BigInteger
BigIntegerMath. sqrt(java.math.BigInteger x, java.math.RoundingMode mode)
Returns the square root ofx
, rounded with the specified rounding mode.static int
IntMath. sqrt(int x, java.math.RoundingMode mode)
Returns the square root ofx
, rounded with the specified rounding mode.static long
LongMath. sqrt(long x, java.math.RoundingMode mode)
Returns the square root ofx
, rounded with the specified rounding mode. -
Uses of GwtIncompatible in com.google.common.net
Classes in com.google.common.net with annotations of type GwtIncompatible Modifier and Type Class Description class
HostSpecifier
A syntactically valid host specifier, suitable for use in a URI.class
InetAddresses
Static utility methods pertaining toInetAddress
instances. -
Uses of GwtIncompatible in com.google.common.primitives
Classes in com.google.common.primitives with annotations of type GwtIncompatible Modifier and Type Class Description class
UnsignedBytes
Static utility methods pertaining tobyte
primitives that interpret values as unsigned (that is, any negative valueb
is treated as the positive value256 + b
).Methods in com.google.common.primitives with annotations of type GwtIncompatible Modifier and Type Method Description static char
Chars. fromByteArray(byte[] bytes)
Returns thechar
value whose big-endian representation is stored in the first 2 bytes ofbytes
; equivalent toByteBuffer.wrap(bytes).getChar()
.static short
Shorts. fromByteArray(byte[] bytes)
Returns theshort
value whose big-endian representation is stored in the first 2 bytes ofbytes
; equivalent toByteBuffer.wrap(bytes).getShort()
.static char
Chars. fromBytes(byte b1, byte b2)
Returns thechar
value whose byte representation is the given 2 bytes, in big-endian order; equivalent toChars.fromByteArray(new byte[] {b1, b2})
.static short
Shorts. fromBytes(byte b1, byte b2)
Returns theshort
value whose byte representation is the given 2 bytes, in big-endian order; equivalent toShorts.fromByteArray(new byte[] {b1, b2})
.static double
Doubles. max(double... array)
Returns the greatest value present inarray
, using the same rules of comparison asMath.max(double, double)
.static float
Floats. max(float... array)
Returns the greatest value present inarray
, using the same rules of comparison asMath.max(float, float)
.static int
Ints. max(int... array)
Returns the greatest value present inarray
.static short
Shorts. max(short... array)
Returns the greatest value present inarray
.static double
Doubles. min(double... array)
Returns the least value present inarray
, using the same rules of comparison asMath.min(double, double)
.static float
Floats. min(float... array)
Returns the least value present inarray
, using the same rules of comparison asMath.min(float, float)
.static int
Ints. min(int... array)
Returns the least value present inarray
.static short
Shorts. min(short... array)
Returns the least value present inarray
.UnsignedInteger
UnsignedInteger. times(UnsignedInteger val)
Returns the result of multiplying this andval
.static byte[]
Chars. toByteArray(char value)
Returns a big-endian representation ofvalue
in a 2-element byte array; equivalent toByteBuffer.allocate(2).putChar(value).array()
.static byte[]
Shorts. toByteArray(short value)
Returns a big-endian representation ofvalue
in a 2-element byte array; equivalent toByteBuffer.allocate(2).putShort(value).array()
.static java.lang.Double
Doubles. tryParse(java.lang.String string)
Parses the specified string as a double-precision floating point value.static java.lang.Float
Floats. tryParse(java.lang.String string)
Parses the specified string as a single-precision floating point value. -
Uses of GwtIncompatible in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent with annotations of type GwtIncompatible Modifier and Type Class Description class
AbstractExecutionThreadService
Base class for services that can implementAbstractExecutionThreadService.startUp()
,AbstractExecutionThreadService.run()
andAbstractExecutionThreadService.shutDown()
methods.class
AbstractIdleService
Base class for services that do not need a thread while "running" but may need one during startup and shutdown.class
AbstractListeningExecutorService
AbstractListeningExecutorService
implementation that createsListenableFuture
instances for eachRunnable
andCallable
submitted to it.class
AbstractScheduledService
Base class for services that can implementAbstractScheduledService.startUp()
andAbstractScheduledService.shutDown()
but while in the "running" state need to perform a periodic task.class
AbstractService
Base class for implementing services that can handleAbstractService.doStart()
andAbstractService.doStop()
requests, responding to them withAbstractService.notifyStarted()
andAbstractService.notifyStopped()
callbacks.class
AtomicDouble
Adouble
value that may be updated atomically.class
AtomicDoubleArray
Adouble
array in which elements may be updated atomically.class
Atomics
Static utility methods pertaining to classes in thejava.util.concurrent.atomic
package.class
CycleDetectingLockFactory
TheCycleDetectingLockFactory
createsReentrantLock
instances andReentrantReadWriteLock
instances that detect potential deadlock by checking for cycles in lock acquisition order.class
ExecutionList
A support class forListenableFuture
implementations to manage their listeners.class
FakeTimeLimiter
A TimeLimiter implementation which actually does not attempt to limit time at all.class
ForwardingBlockingDeque<E>
ABlockingDeque
which forwards all its method calls to anotherBlockingDeque
.class
ForwardingBlockingQueue<E>
ABlockingQueue
which forwards all its method calls to anotherBlockingQueue
.class
ForwardingExecutorService
An executor service which forwards all its method calls to another executor service.class
ForwardingListeningExecutorService
A listening executor service which forwards all its method calls to another listening executor service.class
JdkFutureAdapters
Utilities necessary for working with libraries that supply plainFuture
instances.class
ListenableFutureTask<V extends @Nullable java.lang.Object>
AFutureTask
that also implements theListenableFuture
interface.interface
ListeningExecutorService
AnExecutorService
that returnsListenableFuture
instances.interface
ListeningScheduledExecutorService
AScheduledExecutorService
that returnsListenableFuture
instances from itsExecutorService
methods.class
Monitor
A synchronization abstraction supporting waiting on arbitrary boolean conditions.class
RateLimiter
A rate limiter.interface
Service
An object with an operational state, plus asynchronousService.startAsync()
andService.stopAsync()
lifecycle methods to transition between states.class
ServiceManager
A manager for monitoring and controlling a set of services.class
SimpleTimeLimiter
A TimeLimiter that runs method calls in the background using anExecutorService
.class
Striped<L>
A stripedLock/Semaphore/ReadWriteLock
.class
ThreadFactoryBuilder
A 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 factoryinterface
TimeLimiter
Imposes a time limit on method calls.class
UncaughtExceptionHandlers
Factories forThread.UncaughtExceptionHandler
instances.class
UncheckedTimeoutException
Unchecked version ofTimeoutException
.Methods in com.google.common.util.concurrent with annotations of type GwtIncompatible Modifier and Type Method Description static void
MoreExecutors. addDelayedShutdownHook(java.util.concurrent.ExecutorService service, long terminationTimeout, java.util.concurrent.TimeUnit timeUnit)
Add a shutdown hook to wait for thread completion in the givenservice
.static void
MoreExecutors. addDelayedShutdownHook(java.util.concurrent.ExecutorService service, java.time.Duration terminationTimeout)
Add a shutdown hook to wait for thread completion in the givenservice
.static <T extends @Nullable java.lang.Object>
AsyncCallable<T>Callables. asAsyncCallable(java.util.concurrent.Callable<T> callable, ListeningExecutorService listeningExecutorService)
Creates anAsyncCallable
from aCallable
.static void
Uninterruptibles. awaitTerminationUninterruptibly(java.util.concurrent.ExecutorService executor)
Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly with no timeout.static boolean
Uninterruptibles. awaitTerminationUninterruptibly(java.util.concurrent.ExecutorService executor, long timeout, java.util.concurrent.TimeUnit unit)
Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly.static boolean
Uninterruptibles. awaitTerminationUninterruptibly(java.util.concurrent.ExecutorService executor, java.time.Duration timeout)
Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly.static void
Uninterruptibles. awaitUninterruptibly(java.util.concurrent.CountDownLatch latch)
Invokeslatch.
await()
uninterruptibly.static boolean
Uninterruptibles. awaitUninterruptibly(java.util.concurrent.CountDownLatch latch, long timeout, java.util.concurrent.TimeUnit unit)
Invokeslatch.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. awaitUninterruptibly(java.util.concurrent.CountDownLatch latch, java.time.Duration timeout)
Invokeslatch.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. awaitUninterruptibly(java.util.concurrent.locks.Condition condition, long timeout, java.util.concurrent.TimeUnit unit)
Invokescondition.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. awaitUninterruptibly(java.util.concurrent.locks.Condition condition, java.time.Duration timeout)
Invokescondition.
await(timeout, unit)
uninterruptibly.static <V extends @Nullable java.lang.Object,X extends java.lang.Exception>
VFutures. getChecked(java.util.concurrent.Future<V> future, java.lang.Class<X> exceptionClass)
Returns the result ofFuture.get()
, converting most exceptions to a new instance of the given checked exception type.static <V extends @Nullable java.lang.Object,X extends java.lang.Exception>
VFutures. getChecked(java.util.concurrent.Future<V> future, java.lang.Class<X> exceptionClass, long timeout, java.util.concurrent.TimeUnit unit)
Returns the result ofFuture.get(long, TimeUnit)
, converting most exceptions to a new instance of the given checked exception type.static <V extends @Nullable java.lang.Object,X extends java.lang.Exception>
VFutures. getChecked(java.util.concurrent.Future<V> future, java.lang.Class<X> exceptionClass, java.time.Duration timeout)
Returns the result ofFuture.get(long, TimeUnit)
, converting most exceptions to a new instance of the given checked exception type.static java.util.concurrent.ExecutorService
MoreExecutors. getExitingExecutorService(java.util.concurrent.ThreadPoolExecutor executor)
Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static java.util.concurrent.ExecutorService
MoreExecutors. getExitingExecutorService(java.util.concurrent.ThreadPoolExecutor executor, long terminationTimeout, java.util.concurrent.TimeUnit timeUnit)
Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static java.util.concurrent.ExecutorService
MoreExecutors. getExitingExecutorService(java.util.concurrent.ThreadPoolExecutor executor, java.time.Duration terminationTimeout)
Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static java.util.concurrent.ScheduledExecutorService
MoreExecutors. getExitingScheduledExecutorService(java.util.concurrent.ScheduledThreadPoolExecutor executor)
Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static java.util.concurrent.ScheduledExecutorService
MoreExecutors. getExitingScheduledExecutorService(java.util.concurrent.ScheduledThreadPoolExecutor executor, long terminationTimeout, java.util.concurrent.TimeUnit timeUnit)
Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static java.util.concurrent.ScheduledExecutorService
MoreExecutors. getExitingScheduledExecutorService(java.util.concurrent.ScheduledThreadPoolExecutor executor, java.time.Duration terminationTimeout)
Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static <V extends @Nullable java.lang.Object>
VUninterruptibles. getUninterruptibly(java.util.concurrent.Future<V> future, long timeout, java.util.concurrent.TimeUnit unit)
Invokesfuture.
get(timeout, unit)
uninterruptibly.static <V extends @Nullable java.lang.Object>
VUninterruptibles. getUninterruptibly(java.util.concurrent.Future<V> future, java.time.Duration timeout)
Invokesfuture.
get(timeout, unit)
uninterruptibly.static void
Uninterruptibles. joinUninterruptibly(java.lang.Thread toJoin)
InvokestoJoin.
join()
uninterruptibly.static void
Uninterruptibles. joinUninterruptibly(java.lang.Thread toJoin, long timeout, java.util.concurrent.TimeUnit unit)
Invokesunit.
timedJoin(toJoin, timeout)
uninterruptibly.static void
Uninterruptibles. joinUninterruptibly(java.lang.Thread toJoin, java.time.Duration timeout)
Invokesunit.
timedJoin(toJoin, timeout)
uninterruptibly.static <I extends @Nullable java.lang.Object,O extends @Nullable java.lang.Object>
java.util.concurrent.Future<O>Futures. lazyTransform(java.util.concurrent.Future<I> input, Function<? super I,? extends O> function)
LikeFutures.transform(ListenableFuture, Function, Executor)
except that the transformationfunction
is invoked on each call toget()
on the returned future.static ListeningExecutorService
MoreExecutors. listeningDecorator(java.util.concurrent.ExecutorService delegate)
Creates anExecutorService
whosesubmit
andinvokeAll
methods submitListenableFutureTask
instances to the given delegate executor.static ListeningScheduledExecutorService
MoreExecutors. listeningDecorator(java.util.concurrent.ScheduledExecutorService delegate)
Creates aScheduledExecutorService
whosesubmit
andinvokeAll
methods submitListenableFutureTask
instances to the given delegate executor.static ListeningExecutorService
MoreExecutors. newDirectExecutorService()
Creates an executor service that runs each task in the thread that invokesexecute/submit
, as inThreadPoolExecutor.CallerRunsPolicy
.static java.util.concurrent.Executor
MoreExecutors. newSequentialExecutor(java.util.concurrent.Executor delegate)
Returns anExecutor
that runs each task executed sequentially, such that no two tasks are running concurrently.static java.util.concurrent.ThreadFactory
MoreExecutors. platformThreadFactory()
Returns a default thread factory used to create new threads.static <E> void
Uninterruptibles. putUninterruptibly(java.util.concurrent.BlockingQueue<E> queue, E element)
Invokesqueue.
put(element)
uninterruptibly.static <O extends @Nullable java.lang.Object>
ListenableFuture<O>Futures. scheduleAsync(AsyncCallable<O> callable, long delay, java.util.concurrent.TimeUnit timeUnit, java.util.concurrent.ScheduledExecutorService executorService)
Schedulescallable
on the specifiedexecutor
, returning aFuture
.static <O extends @Nullable java.lang.Object>
ListenableFuture<O>Futures. scheduleAsync(AsyncCallable<O> callable, java.time.Duration delay, java.util.concurrent.ScheduledExecutorService executorService)
Schedulescallable
on the specifiedexecutor
, returning aFuture
.static boolean
MoreExecutors. shutdownAndAwaitTermination(java.util.concurrent.ExecutorService service, long timeout, java.util.concurrent.TimeUnit unit)
Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static boolean
MoreExecutors. shutdownAndAwaitTermination(java.util.concurrent.ExecutorService service, java.time.Duration timeout)
Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static void
Uninterruptibles. sleepUninterruptibly(long sleepFor, java.util.concurrent.TimeUnit unit)
Invokesunit.
sleep(sleepFor)
uninterruptibly.static void
Uninterruptibles. sleepUninterruptibly(java.time.Duration sleepFor)
Invokesunit.
sleep(sleepFor)
uninterruptibly.static <E> E
Uninterruptibles. takeUninterruptibly(java.util.concurrent.BlockingQueue<E> queue)
Invokesqueue.
take()
uninterruptibly.static boolean
Uninterruptibles. tryAcquireUninterruptibly(java.util.concurrent.Semaphore semaphore, int permits, long timeout, java.util.concurrent.TimeUnit unit)
Invokessemaphore.
tryAcquire(permits, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. tryAcquireUninterruptibly(java.util.concurrent.Semaphore semaphore, int permits, java.time.Duration timeout)
Invokessemaphore.
tryAcquire(permits, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. tryAcquireUninterruptibly(java.util.concurrent.Semaphore semaphore, long timeout, java.util.concurrent.TimeUnit unit)
Invokessemaphore.
tryAcquire(1, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. tryAcquireUninterruptibly(java.util.concurrent.Semaphore semaphore, java.time.Duration timeout)
Invokessemaphore.
tryAcquire(1, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. tryLockUninterruptibly(java.util.concurrent.locks.Lock lock, long timeout, java.util.concurrent.TimeUnit unit)
Invokeslock.
tryLock(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles. tryLockUninterruptibly(java.util.concurrent.locks.Lock lock, java.time.Duration timeout)
Invokeslock.
tryLock(timeout, unit)
uninterruptibly.FluentFuture<V>
FluentFuture. withTimeout(long timeout, java.util.concurrent.TimeUnit unit, java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.FluentFuture<V>
FluentFuture. withTimeout(java.time.Duration timeout, java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.static <V extends @Nullable java.lang.Object>
ListenableFuture<V>Futures. withTimeout(ListenableFuture<V> delegate, long time, java.util.concurrent.TimeUnit unit, java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Returns a future that delegates to another but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified duration expires.static <V extends @Nullable java.lang.Object>
ListenableFuture<V>Futures. withTimeout(ListenableFuture<V> delegate, java.time.Duration time, java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Returns a future that delegates to another but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified duration expires.
-