|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Base interface for all cache implementations that are used for buffering btree and data pages.
| Field Summary | |
static Logger |
LOG
|
| Method Summary | |
void |
add(Cacheable item)
Add the item to the cache. |
void |
add(Cacheable item,
int initialRefCount)
Add the item to the cache. |
boolean |
flush()
Call release on all items, but without actually removing them from the cache. |
Cacheable |
get(Cacheable item)
Retrieve an item from the cache. |
Cacheable |
get(long key)
Retrieve an item by its key. |
int |
getBuffers()
Get the size of this cache. |
int |
getFails()
Get the number of times where an object could not be found in the cache. |
java.lang.String |
getFileName()
|
double |
getGrowthFactor()
Returns the factor by which the cache should grow if it can be resized. |
int |
getHits()
Get the number of times where an object has been successfully loaded from the cache. |
int |
getLoad()
|
int |
getUsedBuffers()
Get the number of buffers currently used. |
boolean |
hasDirtyItems()
Returns true if the cache contains any dirty items that need to be written to disk. |
void |
remove(Cacheable item)
Remove an item from the cache. |
void |
resize(int newSize)
Resize the cache. |
void |
setCacheManager(CacheManager manager)
Set the CacheManager object that controls this cache. |
void |
setFileName(java.lang.String fileName)
|
| Field Detail |
public static final Logger LOG
| Method Detail |
public void add(Cacheable item)
item -
public void add(Cacheable item,
int initialRefCount)
item - initialRefCount - the initial reference count for the itempublic Cacheable get(Cacheable item)
item -
public Cacheable get(long key)
key - a unique key, usually the page number
public void remove(Cacheable item)
item - public boolean hasDirtyItems()
public boolean flush()
public int getBuffers()
public double getGrowthFactor()
CacheManager.
public void resize(int newSize)
CacheManager. The newSize parameter
can either be larger or smaller than the current
cache size.
newSize - the new size of the cache.public void setCacheManager(CacheManager manager)
manager - public int getUsedBuffers()
public int getHits()
public int getFails()
public int getLoad()
public void setFileName(java.lang.String fileName)
public java.lang.String getFileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||