01: /* CacheMgr.java */
02:
03: package org.enhydra.shark.api.internal.caching;
04:
05: import org.enhydra.shark.api.internal.working.WfProcessInternal;
06:
07: /**
08: * This interface presents cache that stores processes.
09: * @author Sasa Bojanic
10: * @author Tanja Jovanovic
11: */
12: public interface ProcessCache extends ObjectCache {
13:
14: /**
15: * Adds process to the process cache.
16: *
17: * @param procId process id.
18: * @param proc WfProcessInternal object to be added to the process cache.
19: *
20: * @exception Exception Thrown if an error occurs.
21: */
22: public void add(String procId, WfProcessInternal proc)
23: throws Exception;
24:
25: /**
26: * Removes process from the process cache.
27: *
28: * @param procId process id.
29: *
30: * @exception Exception Thrown if an error occurs.
31: */
32: public void remove(String procId) throws Exception;
33:
34: /**
35: * Returns the process from the process cache with id <i>procId</i>.
36: *
37: * @param procId process id.
38: * @return Process from the cache with the id <i>procId</i> if exists,
39: * otherwise null.
40: * @exception Exception Thrown if an error occurs.
41: */
42: public WfProcessInternal get(String procId) throws Exception;
43: }
|