@J2ObjCIncompatible // ClassValue @VisibleForTesting static GetCheckedTypeValidator classValueValidator() { return GetCheckedTypeValidatorHolder.ClassValueValidator.INSTANCE; }
@J2ObjCIncompatible // ClassValue @VisibleForTesting static GetCheckedTypeValidator classValueValidator() { return GetCheckedTypeValidatorHolder.ClassValueValidator.INSTANCE; }
@J2ObjCIncompatible // ClassValue @VisibleForTesting static GetCheckedTypeValidator classValueValidator() { return GetCheckedTypeValidatorHolder.ClassValueValidator.INSTANCE; }
@J2ObjCIncompatible // ClassValue @VisibleForTesting static GetCheckedTypeValidator classValueValidator() { return GetCheckedTypeValidatorHolder.ClassValueValidator.INSTANCE; }
/** * 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., {@link * SecureDirectoryStream} is not supported). * * <p>{@link RecursiveDeleteOption#ALLOW_INSECURE} can be used to force the recursive delete method * to proceed anyway. * * @since 21.0 * @author Colin Decker */ @Beta @GwtIncompatible @J2ObjCIncompatible // java.nio.file public final class InsecureRecursiveDeleteException extends FileSystemException { public InsecureRecursiveDeleteException(@Nullable String file) { super(file, null, "unable to guarantee security of recursive delete"); } }
/** * 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. * * <p>When {@code duration} is zero, this method hands off to {@link #maximumSize(long) * maximumSize}{@code (0)}, ignoring any otherwise-specified maximum size or weight. This can be * useful in testing, or to disable caching temporarily without a code change. * * <p>Expired entries may be counted in {@link Cache#size}, but will never be visible to read or * write operations. Expired entries are cleaned up as part of the routine maintenance described * in the class javadoc. * * @param duration the length of time after an entry is created that it should be automatically * removed * @return this {@code CacheBuilder} instance (for chaining) * @throws IllegalArgumentException if {@code duration} is negative * @throws IllegalStateException if the time to live or time to idle was already set * @throws ArithmeticException for durations greater than +/- approximately 292 years * @since 25.0 */ @J2ObjCIncompatible @GwtIncompatible // java.time.Duration public CacheBuilder<K, V> expireAfterWrite(java.time.Duration duration) { return expireAfterWrite(duration.toNanos(), TimeUnit.NANOSECONDS); }
/** * 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. Access time is reset by all cache read and write operations (including {@code * Cache.asMap().get(Object)} and {@code Cache.asMap().put(K, V)}), but not by operations on the * collection-views of {@link Cache#asMap}. * * <p>When {@code duration} is zero, this method hands off to {@link #maximumSize(long) * maximumSize}{@code (0)}, ignoring any otherwise-specified maximum size or weight. This can be * useful in testing, or to disable caching temporarily without a code change. * * <p>Expired entries may be counted in {@link Cache#size}, but will never be visible to read or * write operations. Expired entries are cleaned up as part of the routine maintenance described * in the class javadoc. * * @param duration the length of time after an entry is last accessed that it should be * automatically removed * @return this {@code CacheBuilder} instance (for chaining) * @throws IllegalArgumentException if {@code duration} is negative * @throws IllegalStateException if the time to idle or time to live was already set * @throws ArithmeticException for durations greater than +/- approximately 292 years * @since 25.0 */ @J2ObjCIncompatible @GwtIncompatible // java.time.Duration public CacheBuilder<K, V> expireAfterAccess(java.time.Duration duration) { return expireAfterAccess(duration.toNanos(), TimeUnit.NANOSECONDS); }
/** * 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., {@link * SecureDirectoryStream} is not supported). * * <p>{@link RecursiveDeleteOption#ALLOW_INSECURE} can be used to force the recursive delete method * to proceed anyway. * * @since 21.0 * @author Colin Decker */ @Beta @GwtIncompatible @J2ObjCIncompatible // java.nio.file public final class InsecureRecursiveDeleteException extends FileSystemException { public InsecureRecursiveDeleteException(@Nullable String file) { super(file, null, "unable to guarantee security of recursive delete"); } }
@J2ObjCIncompatible // ClassValue enum ClassValueValidator implements GetCheckedTypeValidator { INSTANCE;
/** * Returns the current elapsed time shown on this stopwatch as a {@link Duration}. Unlike {@link * #elapsed(TimeUnit)}, this method does not lose any precision due to rounding. * * @since 22.0 */ @GwtIncompatible @J2ObjCIncompatible public Duration elapsed() { return Duration.ofNanos(elapsedNanos()); }
/** * 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., {@link * SecureDirectoryStream} is not supported). * * <p>{@link RecursiveDeleteOption#ALLOW_INSECURE} can be used to force the recursive delete method * to proceed anyway. * * @since 21.0 * @author Colin Decker */ @Beta @GwtIncompatible @J2ObjCIncompatible // java.nio.file public final class InsecureRecursiveDeleteException extends FileSystemException { public InsecureRecursiveDeleteException(@NullableDecl String file) { super(file, null, "unable to guarantee security of recursive delete"); } }
/** * 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. * * <p>When {@code duration} is zero, this method hands off to {@link #maximumSize(long) * maximumSize}{@code (0)}, ignoring any otherwise-specified maximum size or weight. This can be * useful in testing, or to disable caching temporarily without a code change. * * <p>Expired entries may be counted in {@link Cache#size}, but will never be visible to read or * write operations. Expired entries are cleaned up as part of the routine maintenance described * in the class javadoc. * * @param duration the length of time after an entry is created that it should be automatically * removed * @return this {@code CacheBuilder} instance (for chaining) * @throws IllegalArgumentException if {@code duration} is negative * @throws IllegalStateException if the time to live or time to idle was already set * @throws ArithmeticException for durations greater than +/- approximately 292 years * @since 25.0 */ @J2ObjCIncompatible @GwtIncompatible // java.time.Duration public CacheBuilder<K, V> expireAfterWrite(java.time.Duration duration) { return expireAfterWrite(duration.toNanos(), TimeUnit.NANOSECONDS); }
/** * 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. Access time is reset by all cache read and write operations (including {@code * Cache.asMap().get(Object)} and {@code Cache.asMap().put(K, V)}), but not by operations on the * collection-views of {@link Cache#asMap}. * * <p>When {@code duration} is zero, this method hands off to {@link #maximumSize(long) * maximumSize}{@code (0)}, ignoring any otherwise-specified maximum size or weight. This can be * useful in testing, or to disable caching temporarily without a code change. * * <p>Expired entries may be counted in {@link Cache#size}, but will never be visible to read or * write operations. Expired entries are cleaned up as part of the routine maintenance described * in the class javadoc. * * @param duration the length of time after an entry is last accessed that it should be * automatically removed * @return this {@code CacheBuilder} instance (for chaining) * @throws IllegalArgumentException if {@code duration} is negative * @throws IllegalStateException if the time to idle or time to live was already set * @throws ArithmeticException for durations greater than +/- approximately 292 years * @since 25.0 */ @J2ObjCIncompatible @GwtIncompatible // java.time.Duration public CacheBuilder<K, V> expireAfterAccess(java.time.Duration duration) { return expireAfterAccess(duration.toNanos(), TimeUnit.NANOSECONDS); }
@J2ObjCIncompatible // gc public final class GcFinalization { private GcFinalization() {}
/** * 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., {@link * SecureDirectoryStream} is not supported). * * <p>{@link RecursiveDeleteOption#ALLOW_INSECURE} can be used to force the recursive delete method * to proceed anyway. * * @since 21.0 * @author Colin Decker */ @Beta @GwtIncompatible @J2ObjCIncompatible // java.nio.file public final class InsecureRecursiveDeleteException extends FileSystemException { public InsecureRecursiveDeleteException(@NullableDecl String file) { super(file, null, "unable to guarantee security of recursive delete"); } }
/** * Returns the current elapsed time shown on this stopwatch as a {@link Duration}. Unlike {@link * #elapsed(TimeUnit)}, this method does not lose any precision due to rounding. * * @since 22.0 */ @GwtIncompatible @J2ObjCIncompatible public Duration elapsed() { return Duration.ofNanos(elapsedNanos()); }
/** * Returns the current elapsed time shown on this stopwatch as a {@link Duration}. Unlike {@link * #elapsed(TimeUnit)}, this method does not lose any precision due to rounding. * * @since 22.0 */ @GwtIncompatible @J2ObjCIncompatible public Duration elapsed() { return Duration.ofNanos(elapsedNanos()); }
@J2ObjCIncompatible // ClassValue enum ClassValueValidator implements GetCheckedTypeValidator { INSTANCE;