getCacheSPI

attach

Attach a POJO into PojoCache. It will also recursively put any
sub-POJO into the cache system. A POJO can be the following and have the
consqeuences when attached:

it is Replicable, that is, it
has been annotated with Replicable annotation (or via XML),
and has
been "instrumented" either compile- or load-time. The POJO will be mapped
recursively to the system and fine-grained replication will be
performed.

It is Serializable. The POJO will still be stored in
the cache system. However, it is treated as an "opaque" object per se.
That is, the POJO will neither be intercepted
(for fine-grained operation) or object relantionship will be
maintained.

Neither of above. In this case, a user can specify whether it wants
this POJO to be stored (e.g., replicated or persistent). If not, a
PojoCacheException will be thrown.

id - An id String to identify the object in the cache. To promote
concurrency, we recommend the use of hierarchical String separating by a
designated separator. Default is "/" but it can be set differently via a
System property, jbosscache.separator in the future release. E.g., "/ben",
or "/student/joe", etc.

pojo - object to be inerted into the cache. If null, it will nullify
the fqn node.

attach

Attach a POJO into PojoCache. It will also recursively put any
sub-POJO into the cache system. A POJO can be the following and have the
consequences when attached:

it is Replicable, that is, it
has been annotated with Replicable annotation (or via XML),
and has
been "instrumented" either compile- or load-time. The POJO will be mapped
recursively to the system and fine-grained replication will be
performed.

It is Serializable. The POJO will still be stored in
the cache system. However, it is treated as an "opaque" object per se.
That is, the POJO will neither be intercepted
(for fine-grained operation) or object relationship will be
maintained.

Neither of above. In this case, a user can specify whether it wants
this POJO to be stored (e.g., replicated or persistent). If not, a
PojoCacheException will be thrown.

findAll

Query all managed POJO objects under the id recursively. Note that this will not return
the sub-object POJOs, e.g., if Person has a sub-object of Address, it
won't return Address pojo. Also note also that this operation is not thread-safe
now. In addition, it assumes that once a POJO is found with a id, no more POJO is stored
under the children of the id. That is, we don't mix the id with different POJOs.

findAll

Query all managed POJO objects under the id recursively. Note that this will not return
the sub-object POJOs, e.g., if Person has a sub-object of Address, it
won't return Address pojo. Also note also that this operation is not thread-safe
now. In addition, it assumes that once a POJO is found with a id, no more POJO is stored
under the children of the id. That is, we don't mix the id with different POJOs.

addListener

Add a PojoCache listener that will only monitor a specific ID(FQN) pattern.
A given listener instance can only be added once, whether or not there is
a pattern. To have a duplicate listener simply create a new instance.

The listener must be annotated with the PojoCacheListener annotation, and
all callback methods need to be annotated with the respective event annotations.
Otherwise, an exception will be thrown.