Interface BucketProxy

All Superinterfaces:
Bucket
All Known Implementing Classes:
DefaultBucketProxy

public interface BucketProxy extends Bucket
Provides a light-weight proxy to bucket which state actually stored in external storage, like in-memory jvm or relational database.
  • Method Details

    • toListenable

      BucketProxy toListenable(BucketListener listener)
      Description copied from interface: Bucket
      Returns new copy of this bucket instance decorated by listener. The created bucket will share same tokens with source bucket and vice versa.

      See javadocs for BucketListener in order to understand semantic of listener.

      Specified by:
      toListenable in interface Bucket
      Parameters:
      listener - the listener of bucket events.
      Returns:
      new bucket instance decorated by listener
    • getOptimizationController

      OptimizationController getOptimizationController()
      Returns optimization controller for this proxy.

      This method is actual only if an optimization was applied during bucket construction via RemoteBucketBuilder.withOptimization(Optimization) otherwise returned controller will do nothing.

      Returns:
      optimization controller for this proxy