de.mud.bsx
Class BSXCache
java.lang.Object
|
+--de.mud.bsx.BSXCache
- public class BSXCache
- extends java.lang.Object
a LRU Cache for BSX Objects.
- Version:
- 1.0
- Author:
- Thomas Kriegelstein (tk4@rb.mud.de)
Field Summary |
protected BSXObject[] |
bsx
the objects |
protected int |
cacheSize
the maximum size of cache |
protected java.lang.String[] |
ids
the ids of the objects |
protected static int |
NOT_FOUND
illegal index |
protected int |
size
the size of the cache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cacheSize
protected int cacheSize
- the maximum size of cache
ids
protected java.lang.String[] ids
- the ids of the objects
bsx
protected BSXObject[] bsx
- the objects
size
protected int size
- the size of the cache
NOT_FOUND
protected static final int NOT_FOUND
- illegal index
BSXCache
public BSXCache()
size
public int size()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getEntry
public BSXObject getEntry(java.lang.String id)
removeEntry
public void removeEntry(java.lang.String id)
addEntry
public void addEntry(java.lang.String id,
BSXObject bsxobject)
containsEntry
public boolean containsEntry(java.lang.String id)