Class CacheManager

java.lang.Object
com.semedy.reasoner.edb.persistentstore.CacheManager

public class CacheManager extends Object
Author:
angele
  • Constructor Details

    • CacheManager

      public CacheManager()
  • Method Details

    • usedMemory

      public static long usedMemory()
    • freeMemory

      public static long freeMemory()
    • getCounter

      public static int getCounter()
    • touch

      public static void touch(CacheUnit c)
      cache recently used blocks, free up cached blocks which has not been used for the longest time
    • addToDestroy

      public static void addToDestroy(CacheUnit c)
      add to list of units to destruct at the end
      Parameters:
      c -
    • addToReleasedUnits

      public static void addToReleasedUnits(CacheUnit c)
    • addToAddedUnits

      public static void addToAddedUnits(CacheUnit c)
    • remove

      public static void remove(CacheUnit c)
      remove a cache unit
      Parameters:
      c -
    • setTest

      public static void setTest(boolean t)
    • releaseAll

      public static void releaseAll() throws IOException, EDBException
      release all listed units
      Throws:
      IOException
      EDBException
    • releaseAllBPlusNodes

      public static void releaseAllBPlusNodes() throws IOException, EDBException
      release all listed units
      Throws:
      IOException
      EDBException
    • clear

      public static void clear() throws IOException, EDBException
      clear all lists. Used at the end of a run, e.g. at end of a test to clear all up, destroy destroyables
      Throws:
      EDBException
      IOException
    • freeUp

      public static void freeUp(int size)
      free up memory by releasing cached units
      Parameters:
      size -
      Throws:
      IOException
    • getNumPages

      public static int getNumPages()
      for statistic purposes
      Returns:
    • getAddedPages

      public static int getAddedPages()
      for statistic purpose
      Returns:
    • getPagesToDestroy

      public static int getPagesToDestroy()
      for statistic purpose
      Returns:
    • getReleasedPages

      public static int getReleasedPages()
      for statistic purpose
      Returns:
    • getReleasedClasses

      public static Set<Class> getReleasedClasses()
    • getAddedClasses

      public static Set<Class> getAddedClasses()
    • stop

      public static void stop() throws InterruptedException
      Throws:
      InterruptedException