T
- @PublicApi public class CallableResultCache<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CallableResultCache.CachedOperationId<T> |
Modifier and Type | Method and Description |
---|---|
static <T> CallableResultCache<T> |
build(com.google.common.cache.CacheBuilder<Object,Object> builder)
Builds a simple callable result cache using the supplied builder.
|
static <T> CallableResultCache<T> |
build(com.google.common.cache.CacheBuilder<Object,Object> builder,
CacheAwareness.CacheInfo... cacheIds)
Builds a simple callable result cache using the supplied builder.
|
static <T> CallableResultCache<T> |
buildAlwaysInvalidating(com.google.common.cache.CacheBuilder<Object,Object> builder,
CacheAwareness.CacheInfo... cacheIds)
Builds a simple callable result cache using the supplied builder.
|
T |
call(Callable<T> callable,
Object... keys)
executes a callable if no fresh result is cached, throws an checked exception
See
LoadingCache.getUnchecked(Object) |
T |
callChecked(Callable<T> callable,
Object... keys)
executes a callable if no fresh result is cached, throws a checked exception
See
LoadingCache.get(Object) |
com.google.common.cache.CacheStats |
stats() |
public static <T> CallableResultCache<T> build(@NotNull com.google.common.cache.CacheBuilder<Object,Object> builder)
public static <T> CallableResultCache<T> build(@NotNull com.google.common.cache.CacheBuilder<Object,Object> builder, CacheAwareness.CacheInfo... cacheIds)
CacheAwareness.withValuesOlderThanTimestampReloaded(BambooRunnables.ThrowingX, long, CacheAwareness.CacheInfo...)
public static <T> CallableResultCache<T> buildAlwaysInvalidating(@NotNull com.google.common.cache.CacheBuilder<Object,Object> builder, CacheAwareness.CacheInfo... cacheIds)
build(com.google.common.cache.CacheBuilder, com.atlassian.bamboo.util.CacheAwareness.CacheInfo...)
, AlwaysInvalidatingCacheDecorator
public com.google.common.cache.CacheStats stats()
public T call(@NotNull Callable<T> callable, Object... keys)
LoadingCache.getUnchecked(Object)
public T callChecked(@NotNull Callable<T> callable, Object... keys) throws ExecutionException
LoadingCache.get(Object)
ExecutionException
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.