Module io.github.bucket4j.core
Class AbstractProxyManager<K>
java.lang.Object
io.github.bucket4j.distributed.proxy.AbstractProxyManager<K>
- All Implemented Interfaces:
ProxyManager<K>
- Direct Known Subclasses:
AbstractCompareAndSwapBasedProxyManager,AbstractLockBasedProxyManager,AbstractSelectForUpdateBasedProxyManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasAsync()Returns asynchronous API for this proxy manager.builder()Creates new instance ofRemoteBucketBuilder.protected longprotected abstract <T> CommandResult<T>protected abstract <T> CompletableFuture<CommandResult<T>>executeAsync(K key, Request<T> request) protected Versionprotected ClientSideConfigprotected LonggetProxyConfiguration(K key) Locates configuration of bucket which actually stored in the underlying storage.protected abstract CompletableFuture<Void>removeAsync(K key) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.bucket4j.distributed.proxy.ProxyManager
getProxy, isAsyncModeSupported, isExpireAfterWriteSupported, removeProxy, withMapper
-
Constructor Details
-
AbstractProxyManager
-
-
Method Details
-
asAsync
Description copied from interface:ProxyManagerReturns asynchronous API for this proxy manager.- Specified by:
asAsyncin interfaceProxyManager<K>- Returns:
- asynchronous API for this proxy manager.
-
builder
Description copied from interface:ProxyManagerCreates new instance ofRemoteBucketBuilder.Use this method only if you need to create bucket with parameters that can not be specified via
AbstractProxyManagerBuilder, otherwise preferProxyManager.getProxy(Object, Supplier)- Specified by:
builderin interfaceProxyManager<K>- Returns:
- new instance of
RemoteBucketBuilder
-
getProxyConfiguration
Description copied from interface:ProxyManagerLocates configuration of bucket which actually stored in the underlying storage.- Specified by:
getProxyConfigurationin interfaceProxyManager<K>- Parameters:
key- the unique identifier used to point to the bucket in external storage.- Returns:
- Optional surround the configuration or empty optional if bucket with specified key is not stored.
-
execute
-
executeAsync
-
removeAsync
-
getClientSideConfig
-
getBackwardCompatibilityVersion
-
currentTimeNanos
protected long currentTimeNanos() -
getClientSideTime
-