KEY - The class of the indexing key.VALUE - The class of the cached item.public abstract class AbstractCache<KEY,VALUE> extends Object implements Iterable<VALUE>
| Constructor and Description |
|---|
AbstractCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the cache of all entries.
|
protected abstract VALUE |
fetch(KEY key)
Logic to retrieve the data item from its primary store based on the provided key.
|
VALUE |
get(KEY key)
Get value for specified key.
|
boolean |
isCached(KEY key)
Returns true if the item associated with the specified key is in the cache.
|
Iterator<VALUE> |
iterator()
Iterate over value set.
|
void |
refresh()
Refresh the cache.
|
int |
size()
Return number of entries.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected abstract VALUE fetch(KEY key)
key - The key.public VALUE get(KEY key)
key - The key.public boolean isCached(KEY key)
key - The key.public void refresh()
public void clear()
public int size()
Copyright © 2023 Fujion Framework. All rights reserved.