Class KAbstractDataCache

java.lang.Object
com.kheops.util.KAbstractDataCache
Direct Known Subclasses:
KMemoryDataCache

public abstract class KAbstractDataCache extends Object
An abstract class that defines member variables used to monitor a cache.
  • Field Details

    • currentSize

      protected long currentSize
      The curent size (in bytes) of the cache.
    • maximumSize

      protected long maximumSize
      The maximum size (in bytes) of the cache, -1 if unlimited.
    • hits

      protected long hits
      The sucessfull retrieval data count.
    • misses

      protected long misses
      The number retrieval attemps.
  • Constructor Details

    • KAbstractDataCache

      protected KAbstractDataCache(long maximumSize)
  • Method Details

    • getCurrentSize

      public long getCurrentSize()
      Returns the current size of the cache.
      Returns:
      the current size of the cache.
    • getMaximumSize

      public long getMaximumSize()
      Returns the maximum size of the cache.
      Returns:
      the maximum size of the cache.
    • getHits

      public long getHits()
      Returns the sucessfull retrieval data count.
      Returns:
      the sucessfull retrieval data count.
    • getMisses

      public long getMisses()
      Returns the number retrieval attemps.
      Returns:
      the number retrieval attemps.
    • getMonitoringInfo

      public KDataCacheMonitoringInfo getMonitoringInfo()
      Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.
      Returns:
      a KDataCacheMonitoringInfo object.
    • getMonitoringInfo

      public KDataCacheMonitoringInfo getMonitoringInfo(String partialKey)
      Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.
      Returns:
      a KDataCacheMonitoringInfo object.
    • getCount

      public abstract long getCount()
    • getCount

      public abstract long getCount(String partialKey)
    • getCurrentSize

      public abstract long getCurrentSize(String partialKey)
    • store

      public abstract void store(String key, byte[] data) throws IOException
      Throws:
      IOException
    • export

      public abstract void export(KAbstractDataCache cache) throws IOException
      Throws:
      IOException
    • removeAll

      public abstract void removeAll()
    • removeMatching

      public abstract void removeMatching(String partialKey)