|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Cache<T extends Identifiable>
Cache a stateful object and make sure any life cycle callbacks are called at the appropriate time. A cache is linked to an object factory. How the link is established is left beyond scope.
| Method Summary | |
|---|---|
T |
create(java.lang.Class<?>[] initTypes,
java.lang.Object[] initValues)
Create a new object. |
T |
get(java.lang.Object key)
Get the specified object from cache. |
T |
peek(java.lang.Object key)
Peek at an object which might be in use. |
void |
release(T obj)
Release the object from use. |
void |
remove(java.lang.Object key)
Remove the specified object from cache. |
void |
start()
Start the cache. |
void |
stop()
Stop the cache. |
| Method Detail |
|---|
T create(java.lang.Class<?>[] initTypes,
java.lang.Object[] initValues)
initTypes - initValues -
T get(java.lang.Object key)
throws javax.ejb.NoSuchEJBException
key - the identifier of the object
javax.ejb.NoSuchEJBException - if the object does not exist
T peek(java.lang.Object key)
throws javax.ejb.NoSuchEJBException
key - the identifier of the object
javax.ejb.NoSuchEJBException - if the object does not existvoid release(T obj)
obj - the objectvoid remove(java.lang.Object key)
key - the identifier of the objectvoid start()
void stop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||