|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PojoCacheIfc
Interface for PojoCache. User should use this interface directly to access the public APIs.
PojoCache is an in-memory, transactional, fine-grained, and object-oriented cache system. It differs from the typical generic cache library by operating on the pojo level directly without requiring that object to be serializable (although it does require "aspectizing" the POJO). Further, it can preserve object graph during replication or persistency. It also track the replication via fine-grained maner, i.e., only changed fields are replicated.
Method Summary | |
---|---|
java.util.Map |
findObjects(Fqn fqn)
Query all managed pojo objects under the fqn recursively. |
java.util.Map |
findObjects(java.lang.String fqn)
Query all managed pojo objects under the fqn recursively. |
CachedType |
getCachedType(java.lang.Class clazz)
Obtain a cache aop type for user to traverse the defined "primitive" types in aop. |
java.lang.Object |
getObject(Fqn fqn)
Retrieve pojo object from the cache. |
java.lang.Object |
getObject(java.lang.String fqn)
Retrieve pojo from the cache. |
boolean |
isMarshallNonSerializable()
Indicate whether the flag is set or not. |
java.lang.Object |
putObject(Fqn fqn,
java.lang.Object obj)
Insert a pojo into the cache. |
java.lang.Object |
putObject(java.lang.String fqn,
java.lang.Object obj)
Insert a pojo into the cache. |
java.lang.Object |
removeObject(Fqn fqn)
Remove pojo object from the cache. |
java.lang.Object |
removeObject(java.lang.String fqn)
Remove pojo object from the cache. |
void |
setMarshallNonSerializable(boolean marshall)
If the flag is set, then POJO which is not instrumented under AOP and which is not implementing the Serializable interface will still be marshalled and make serializable. |
Method Detail |
---|
java.lang.Object getObject(java.lang.String fqn) throws CacheException
fqn
- Instance that associates with this node.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.lang.Object getObject(Fqn fqn) throws CacheException
fqn
- Instance that associates with this node.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.lang.Object putObject(java.lang.String fqn, java.lang.Object obj) throws CacheException
jboss-aop.xml
).
Note that List
, Map
, Set
attributes are aop-enabled, by default, as well.
fqn
- The fqn instance to associate with the object in the cache.obj
- aop-enabled object to be inerted into the cache. If null,
it will nullify the fqn node.obj
- Return the previous content under fqn.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.lang.Object putObject(Fqn fqn, java.lang.Object obj) throws CacheException
jboss-aop.xml
).
Note that List
, Map
, Set
attributes are aop-enabled, by default, as well.
fqn
- The fqn instance to associate with the object in the cache.obj
- aop-enabled object to be inerted into the cache. If null,
it will nullify the fqn node.obj
- Return the previous content under fqn.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.lang.Object removeObject(java.lang.String fqn) throws CacheException
fqn
- Instance that associates with this node.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.lang.Object removeObject(Fqn fqn) throws CacheException
fqn
- Instance that associates with this node.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.util.Map findObjects(java.lang.String fqn) throws CacheException
fqn
- The starting place to find all pojos.
CacheException
- Throws if there is an error related to the cache operation, e.g.,
TimeoutException
.java.util.Map findObjects(Fqn fqn) throws CacheException
fqn
- The starting place to find all pojos.
CacheException
void setMarshallNonSerializable(boolean marshall)
boolean isMarshallNonSerializable()
CachedType getCachedType(java.lang.Class clazz)
clazz
- The original pojo class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |