V - the value type.public class GuavaDirectExternalCache<V> extends AbstractExternalCache<V> implements com.atlassian.vcache.DirectExternalCache<V>
DirectExternalCache.lockTimeout, name| Constructor and Description |
|---|
GuavaDirectExternalCache(java.lang.String name,
com.google.common.cache.Cache<java.lang.String,IdentifiedData> delegate,
java.util.function.Supplier<com.atlassian.vcache.internal.RequestContext> contextSupplier,
ExternalCacheKeyGenerator keyGenerator,
java.util.Optional<com.atlassian.marshalling.api.MarshallingPair<V>> valueMarshalling,
java.time.Duration lockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractExternalCacheRequestContext<V> |
ensureCacheContext() |
java.util.concurrent.CompletionStage<java.util.Optional<V>> |
get(java.lang.String internalKey) |
java.util.concurrent.CompletionStage<V> |
get(java.lang.String internalKey,
java.util.function.Supplier<V> supplier) |
java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,V>> |
getBulk(java.util.function.Function<java.util.Set<java.lang.String>,java.util.Map<java.lang.String,V>> factory,
java.lang.Iterable<java.lang.String> internalKeys) |
java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,java.util.Optional<V>>> |
getBulk(java.lang.Iterable<java.lang.String> internalKeys) |
java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,java.util.Optional<com.atlassian.vcache.IdentifiedValue<V>>>> |
getBulkIdentified(java.lang.Iterable<java.lang.String> internalKeys) |
java.util.concurrent.CompletionStage<java.util.Optional<com.atlassian.vcache.IdentifiedValue<V>>> |
getIdentified(java.lang.String internalKey) |
java.util.concurrent.CompletionStage<com.atlassian.vcache.IdentifiedValue<V>> |
getIdentified(java.lang.String internalKey,
java.util.function.Supplier<V> supplier) |
protected org.slf4j.Logger |
getLogger() |
protected com.atlassian.vcache.ExternalCacheException |
mapException(java.lang.Exception ex) |
java.util.concurrent.CompletionStage<java.lang.Boolean> |
put(java.lang.String internalKey,
V value,
com.atlassian.vcache.PutPolicy policy) |
java.util.concurrent.CompletionStage<java.lang.Void> |
remove(java.lang.Iterable<java.lang.String> internalKeys) |
java.util.concurrent.CompletionStage<java.lang.Void> |
removeAll() |
java.util.concurrent.CompletionStage<java.lang.Boolean> |
removeIf(java.lang.String internalKey,
com.atlassian.vcache.CasIdentifier casId) |
java.util.concurrent.CompletionStage<java.lang.Boolean> |
replaceIf(java.lang.String internalKey,
com.atlassian.vcache.CasIdentifier casId,
V newValue) |
getName, perform, performpublic GuavaDirectExternalCache(java.lang.String name,
com.google.common.cache.Cache<java.lang.String,IdentifiedData> delegate,
java.util.function.Supplier<com.atlassian.vcache.internal.RequestContext> contextSupplier,
ExternalCacheKeyGenerator keyGenerator,
java.util.Optional<com.atlassian.marshalling.api.MarshallingPair<V>> valueMarshalling,
java.time.Duration lockTimeout)
public java.util.concurrent.CompletionStage<java.util.Optional<V>> get(java.lang.String internalKey)
get in interface com.atlassian.vcache.ExternalCache<V>public java.util.concurrent.CompletionStage<V> get(java.lang.String internalKey, java.util.function.Supplier<V> supplier)
get in interface com.atlassian.vcache.ExternalCache<V>public java.util.concurrent.CompletionStage<java.util.Optional<com.atlassian.vcache.IdentifiedValue<V>>> getIdentified(java.lang.String internalKey)
getIdentified in interface com.atlassian.vcache.DirectExternalCache<V>public java.util.concurrent.CompletionStage<com.atlassian.vcache.IdentifiedValue<V>> getIdentified(java.lang.String internalKey, java.util.function.Supplier<V> supplier)
getIdentified in interface com.atlassian.vcache.DirectExternalCache<V>public java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,java.util.Optional<V>>> getBulk(java.lang.Iterable<java.lang.String> internalKeys)
getBulk in interface com.atlassian.vcache.ExternalCache<V>public java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,V>> getBulk(java.util.function.Function<java.util.Set<java.lang.String>,java.util.Map<java.lang.String,V>> factory, java.lang.Iterable<java.lang.String> internalKeys)
getBulk in interface com.atlassian.vcache.ExternalCache<V>public java.util.concurrent.CompletionStage<java.util.Map<java.lang.String,java.util.Optional<com.atlassian.vcache.IdentifiedValue<V>>>> getBulkIdentified(java.lang.Iterable<java.lang.String> internalKeys)
getBulkIdentified in interface com.atlassian.vcache.DirectExternalCache<V>public java.util.concurrent.CompletionStage<java.lang.Boolean> put(java.lang.String internalKey,
V value,
com.atlassian.vcache.PutPolicy policy)
put in interface com.atlassian.vcache.ExternalWriteOperationsUnbuffered<V>public java.util.concurrent.CompletionStage<java.lang.Boolean> removeIf(java.lang.String internalKey,
com.atlassian.vcache.CasIdentifier casId)
removeIf in interface com.atlassian.vcache.DirectExternalCache<V>public java.util.concurrent.CompletionStage<java.lang.Boolean> replaceIf(java.lang.String internalKey,
com.atlassian.vcache.CasIdentifier casId,
V newValue)
replaceIf in interface com.atlassian.vcache.DirectExternalCache<V>public java.util.concurrent.CompletionStage<java.lang.Void> remove(java.lang.Iterable<java.lang.String> internalKeys)
remove in interface com.atlassian.vcache.ExternalWriteOperationsUnbuffered<V>public java.util.concurrent.CompletionStage<java.lang.Void> removeAll()
removeAll in interface com.atlassian.vcache.ExternalWriteOperationsUnbuffered<V>protected AbstractExternalCacheRequestContext<V> ensureCacheContext()
ensureCacheContext in class AbstractExternalCache<V>protected com.atlassian.vcache.ExternalCacheException mapException(java.lang.Exception ex)
mapException in class AbstractExternalCache<V>protected org.slf4j.Logger getLogger()
getLogger in class AbstractExternalCache<V>Copyright © 2022 Atlassian. All rights reserved.