| Modifier and Type | Field and Description |
|---|---|
| private final Cache | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public CacheObject | find(int
the unique key of the element pos)Implements org. Get an element from the cache if it is available. |
| public CacheObject | get(int
the unique key of the element pos)Implements org. Get an element in the cache if it is available. |
| public ArrayList | getAllChanged()
Implements org. Get all objects in the cache that have been changed. |
| public int | |
| public int | |
| public void | |
| public boolean | remove(int
the unique key of the element pos)Implements org. Remove an object from the cache. |
| public void | setMaxMemory(int
the maximum size in KB size)Implements org. Set the maximum memory to be used by this cache. |
| public CacheObject | update(int
the unique key of the element pos, CacheObject the element record)Implements org. Update an element in the cache. |
| baseCache | back to summary |
|---|---|
| private final Cache baseCache | |
| map | back to summary |
|---|---|
| private final Map<Integer, CacheObject> map | |
| CacheSecondLevel | back to summary |
|---|---|
| pack-priv CacheSecondLevel(Cache cache, Map<Integer, CacheObject> map) | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Clear the cache.
| |
| find | back to summary |
|---|---|
| public CacheObject find(int pos) Implements org. Doc from org. Get an element from the cache if it is available. This will not move the item to the front of the list.
| |
| get | back to summary |
|---|---|
| public CacheObject get(int pos) Implements org. Doc from org. Get an element in the cache if it is available. This will move the item to the front of the list.
| |
| getAllChanged | back to summary |
|---|---|
| public ArrayList Implements org. Doc from org. Get all objects in the cache that have been changed.
| |
| getMaxMemory | back to summary |
|---|---|
| public int getMaxMemory() Implements org. Doc from org. Get the maximum memory to be used.
| |
| getMemory | back to summary |
|---|---|
| public int getMemory() Implements org. Doc from org. Get the used size in KB.
| |
| put | back to summary |
|---|---|
| public void put(CacheObject r) Implements org. Doc from org. Add an element to the cache. Other items may fall out of the cache because of this. It is not allowed to add the same record twice.
| |
| remove | back to summary |
|---|---|
| public boolean remove(int pos) Implements org. Doc from org. Remove an object from the cache.
| |
| setMaxMemory | back to summary |
|---|---|
| public void setMaxMemory(int size) Implements org. Doc from org. Set the maximum memory to be used by this cache.
| |
| update | back to summary |
|---|---|
| public CacheObject update(int pos, CacheObject record) Implements org. Doc from org. Update an element in the cache. This will move the item to the front of the list.
| |