Class CacheManager4
java.lang.Object
com.semedy.reasoner.edb.persistentstore.CacheManager4
- Author:
- angele
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
add to list of units to destruct at the endstatic void
static void
clear()
clear all lists.static long
static void
freeUp
(int size) free up memory by releasing cached unitsstatic int
for statistic purposestatic int
static int
for statistic purposesstatic int
for statistic purposestatic int
for statistic purposestatic void
release all listed unitsstatic void
release all listed unitsstatic void
remove a cache unitstatic void
setTest
(boolean t) static void
stop()
static void
cache recently used blocks, free up cached blocks which has not been used for the longest timestatic long
-
Constructor Details
-
CacheManager4
public CacheManager4()
-
-
Method Details
-
usedMemory
public static long usedMemory() -
freeMemory
public static long freeMemory() -
getCounter
public static int getCounter() -
touch
cache recently used blocks, free up cached blocks which has not been used for the longest time -
addToDestroy
add to list of units to destruct at the end- Parameters:
c
-
-
addToReleasedUnits
-
addToAddedUnits
-
remove
remove a cache unit- Parameters:
c
-
-
setTest
public static void setTest(boolean t) -
releaseAll
release all listed units- Throws:
IOException
EDBException
-
releaseAllBPlusNodes
release all listed units- Throws:
IOException
EDBException
-
clear
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
-
getAddedClasses
-
stop
- Throws:
InterruptedException
-