public interface AsyncOptimizationController
AsyncBucketProxy
.
This interface is actual only if an optimization was applied during bucket construction via RemoteAsyncBucketBuilder.withOptimization(Optimization)
otherwise all methods of controller will do nothing.
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
syncByCondition(long unsynchronizedTokens,
Duration timeSinceLastSync)
Initiates immediate synchronization of local copy of bucket with remote storage in case of both conditions bellow are
true :
Accumulated amount of locally consumed tokens without external synchronization is greater than or equal to unsynchronizedTokens
Time passed since last synchronization with external storage is greater than or equal to timeSinceLastSync
|
default CompletableFuture<Void> |
syncImmediately()
Initiates immediate synchronization of local copy of bucket with remote storage
|
default CompletableFuture<Void> syncImmediately()
CompletableFuture<Void> syncByCondition(long unsynchronizedTokens, Duration timeSinceLastSync)
true
:
unsynchronizedTokens
timeSinceLastSync
unsynchronizedTokens
- criterion for accumulated amount of unsynchronized tokenstimeSinceLastSync
- criterion for time passed since last synchronizationCopyright © 2022. All rights reserved.