|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.caching.LRUProcessCache
public class LRUProcessCache
This class is LRU (least recently used mechanism) cache for storing processes.
Field Summary | |
---|---|
protected org.enhydra.shark.utilities.LRUMap |
cache
LRU process cache. |
Constructor Summary | |
---|---|
LRUProcessCache()
|
Method Summary | |
---|---|
void |
add(java.lang.String procId,
WfProcessInternal proc)
Adds process to the process cache. |
void |
configure(CallbackUtilities cus)
Configures proccess cache. |
WfProcessInternal |
get(java.lang.String procId)
Returns the process from the process cache with id procId. |
java.util.List |
getAll()
Returns all processes from the process cache. |
int |
getSize()
Returns the size of the process cache. |
int |
howManyEntries()
|
void |
remove(java.lang.String procId)
Removes process from the process cache. |
void |
setSize(int size)
Sets size of the process cache to value size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.enhydra.shark.utilities.LRUMap cache
Constructor Detail |
---|
public LRUProcessCache()
Method Detail |
---|
public void configure(CallbackUtilities cus) throws java.lang.Exception
configure
in interface ObjectCache
cus
- an instance of CallbackUtilities used to get
properties for configuring proccess cache.
java.lang.Exception
- Thrown if an error occurs.public void add(java.lang.String procId, WfProcessInternal proc) throws java.lang.Exception
add
in interface ProcessCache
procId
- Process id.proc
- WfProcessInternal object to be added to the process cache.
java.lang.Exception
- Thrown if an error occurs.public void remove(java.lang.String procId) throws java.lang.Exception
remove
in interface ProcessCache
procId
- Process id.
java.lang.Exception
- Thrown if an error occurs.public WfProcessInternal get(java.lang.String procId) throws java.lang.Exception
get
in interface ProcessCache
procId
- Process id.
java.lang.Exception
- Thrown if an error occurs.public void setSize(int size) throws java.lang.Exception
setSize
in interface ObjectCache
size
- New size of the process cache.
java.lang.Exception
- Thrown if an error occurs.public int getSize() throws java.lang.Exception
getSize
in interface ObjectCache
java.lang.Exception
- Thrown if an error occurs.public int howManyEntries() throws java.lang.Exception
howManyEntries
in interface ObjectCache
java.lang.Exception
public java.util.List getAll() throws java.lang.Exception
getAll
in interface ObjectCache
java.lang.Exception
- Thrown if an error occurs.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |