All Known Implementing Classes:
BatchingOptimization, DelayOptimization, ManuallySyncingOptimization, PredictiveOptimization, SkipSyncOnZeroOptimization

public interface Optimization
Specifies request optimization strategy for BucketProxy and AsyncBucketProxy. By default, an interaction with BucketProxy and AsyncBucketProxy leads to immediately request to remote storage, various implementations of Optimization interface can optimize this behavior.
See Also:
  • Field Details

  • Method Details

    • withListener

      Optimization withListener(OptimizationListener listener)
      Specifies the listener for optimization events
      Parameters:
      listener - the listener for optimization events
      Returns:
      the new instance of Optimization with configured listener
    • apply

      CommandExecutor apply(CommandExecutor originalExecutor)
      Decorates command executor in order to apply optimization strategy.
      Parameters:
      originalExecutor - command executor that need to be optimized
      Returns:
      decorated command executor
    • apply

      AsyncCommandExecutor apply(AsyncCommandExecutor originalExecutor)
      Decorates command executor in order to apply optimization strategy.
      Parameters:
      originalExecutor - command executor that need to be optimized
      Returns:
      decorated command executor