public class CacheTQ extends Object implements Cache
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache.
|
CacheObject |
find(int pos)
Get an element from the cache if it is available.
|
CacheObject |
get(int pos)
Get an element in the cache if it is available.
|
ArrayList<CacheObject> |
getAllChanged()
Get all objects in the cache that have been changed.
|
int |
getMaxMemory()
Get the maximum memory to be used.
|
int |
getMemory()
Get the used size in KB.
|
void |
put(CacheObject r)
Add an element to the cache.
|
boolean |
remove(int pos)
Remove an object from the cache.
|
void |
setMaxMemory(int maxMemoryKb)
Set the maximum memory to be used by this cache.
|
CacheObject |
update(int pos,
CacheObject record)
Update an element in the cache.
|
public void clear()
Cache
public CacheObject find(int pos)
Cache
public CacheObject get(int pos)
Cache
public ArrayList<CacheObject> getAllChanged()
Cache
getAllChanged
in interface Cache
public int getMaxMemory()
Cache
getMaxMemory
in interface Cache
public int getMemory()
Cache
public void put(CacheObject r)
Cache
public boolean remove(int pos)
Cache
public void setMaxMemory(int maxMemoryKb)
Cache
setMaxMemory
in interface Cache
maxMemoryKb
- the maximum size in KBpublic CacheObject update(int pos, CacheObject record)
Cache
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.