All Known Implementing Classes:
StandardCacheBucket

public interface CacheBucket
A cache bucket holds data for a certain range. Actually, it specifies the parameters of a range, but the data may or may not be present, depending on whether or not it's "provisional".
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Tell the bucket to re-evaluate its relevency.
    boolean
    Request that the bucket release its data and mark itself as invalid.
    Returns the cached data, or goes to the store and retrieves it.
    long
     
    int
    A rough estimation, in bytes, of the weight of this bucket.
    double
    The score of how "important" this bucket is, so that it can be ranked against other buckets.
    long
     
    boolean
    Indicates that the bucket is still valid and hasn't been ejected.
  • Method Details

    • isValid

      boolean isValid()
      Indicates that the bucket is still valid and hasn't been ejected. Ejected buckets can still return good data, but they shouldn't be used much and should be removed when possible.
    • getStartTime

      long getStartTime()
    • getEndTime

      long getEndTime()
    • getMemorySize

      int getMemorySize()
      A rough estimation, in bytes, of the weight of this bucket.
    • calculateRelevency

      void calculateRelevency()
      Tell the bucket to re-evaluate its relevency.
    • getRelevencyScore

      double getRelevencyScore()
      The score of how "important" this bucket is, so that it can be ranked against other buckets.
    • getData

      Dataset getData(TagHistoryQueryProvider backingProvider) throws Exception
      Returns the cached data, or goes to the store and retrieves it.
      Throws:
      Exception
    • eject

      boolean eject()
      Request that the bucket release its data and mark itself as invalid.