Module io.github.bucket4j.core
Class AbstractCompareAndSwapBasedProxyManager<K>
- java.lang.Object
-
- io.github.bucket4j.distributed.proxy.AbstractProxyManager<K>
-
- io.github.bucket4j.distributed.proxy.generic.compare_and_swap.AbstractCompareAndSwapBasedProxyManager<K>
-
- Type Parameters:
K- the generic type for unique identifiers that used to point to the bucket in external storage.
- All Implemented Interfaces:
ProxyManager<K>
public abstract class AbstractCompareAndSwapBasedProxyManager<K> extends AbstractProxyManager<K>
The base class for proxy managers that built on top of idea that underlining storage provide transactions and locking.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCompareAndSwapBasedProxyManager(ClientSideConfig clientSideConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AsyncCompareAndSwapOperationbeginAsyncCompareAndSwapOperation(K key)protected abstract CompareAndSwapOperationbeginCompareAndSwapOperation(K key)<T> CommandResult<T>execute(K key, Request<T> request)<T> CompletableFuture<CommandResult<T>>executeAsync(K key, Request<T> request)-
Methods inherited from class io.github.bucket4j.distributed.proxy.AbstractProxyManager
asAsync, builder, getBackwardCompatibilityVersion, getClientSideConfig, getClientSideTime, getProxyConfiguration, removeAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.bucket4j.distributed.proxy.ProxyManager
isAsyncModeSupported, removeProxy, withMapper
-
-
-
-
Constructor Detail
-
AbstractCompareAndSwapBasedProxyManager
protected AbstractCompareAndSwapBasedProxyManager(ClientSideConfig clientSideConfig)
-
-
Method Detail
-
execute
public <T> CommandResult<T> execute(K key, Request<T> request)
- Specified by:
executein classAbstractProxyManager<K>
-
executeAsync
public <T> CompletableFuture<CommandResult<T>> executeAsync(K key, Request<T> request)
- Specified by:
executeAsyncin classAbstractProxyManager<K>
-
beginCompareAndSwapOperation
protected abstract CompareAndSwapOperation beginCompareAndSwapOperation(K key)
-
beginAsyncCompareAndSwapOperation
protected abstract AsyncCompareAndSwapOperation beginAsyncCompareAndSwapOperation(K key)
-
-