| Modifier and Type | Field and Description |
|---|---|
| public CacheObject | cacheChained
The next element in the hash chain. |
| public CacheObject | cacheNext
The next element in the LRU linked list. |
| public CacheObject | cachePrevious
The previous element in the LRU linked list. |
| private boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | |
| public int | compareTo(CacheObject
the object to be compared. other)Implements java. Compares this object with the specified object for order. |
| public abstract int | |
| public int | |
| public boolean | Returns: if it has been changedCheck if this cache object has been changed and thus needs to be written back to the storage. |
| public boolean | |
| public void | |
| public void |
| cacheChained | back to summary |
|---|---|
| public CacheObject cacheChained The next element in the hash chain. | |
| cacheNext | back to summary |
|---|---|
| public CacheObject cacheNext The next element in the LRU linked list. If the next element is the head, then this element is the least recently used object. | |
| cachePrevious | back to summary |
|---|---|
| public CacheObject cachePrevious The previous element in the LRU linked list. If the previous element is the head, then this element is the most recently used object. | |
| changed | back to summary |
|---|---|
| private boolean changed | |
| pos | back to summary |
|---|---|
| private int pos | |
| CacheObject | back to summary |
|---|---|
| public CacheObject() | |
| canRemove | back to summary |
|---|---|
| public abstract boolean canRemove() Check if the object can be removed from the cache. For example pinned objects can not be removed.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(CacheObject other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| getMemory | back to summary |
|---|---|
| public abstract int getMemory() Get the estimated used memory.
| |
| getPos | back to summary |
|---|---|
| public int getPos() | |
| isChanged | back to summary |
|---|---|
| public boolean isChanged() Check if this cache object has been changed and thus needs to be written back to the storage.
| |
| isStream | back to summary |
|---|---|
| public boolean isStream() | |
| setChanged | back to summary |
|---|---|
| public void setChanged(boolean b) | |
| setPos | back to summary |
|---|---|
| public void setPos(int pos) | |