|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.basics.structs.CacheActionStruct
public class CacheActionStruct
A CacheAction is used for notification registration, and notifications, of
changes to persistent message instances. By tracking changes, an
application can ensure that its cached information remains in synch with
the information recorded in the
DataManager.
CacheActions are sourced from, and registered with, a
CacheManager, which
is configured to work directly with the DataManager (or
another CacheManager).
For overview information on cache management, see
Persist.html
in the top level documentation.
CacheActions do not contain instance data. They are a notification that an instance has been changed. On receiving a CacheAction, most applications simply drop that instance from their cache.
Wildcard specification is allowed only for UNREGISTER actions. See the struct fields for details.
| Field Summary | |
|---|---|
protected int |
action
The caching action being done. |
protected java.lang.String |
messageClass
The fully qualified classname of the message being being tracked. |
protected long |
revisionNumber
The current revision number of the instance. |
protected java.lang.String[] |
sources
The instance names of the sources requesting tracking updates. |
protected long |
uniqueID
The uniqueID of the message instance being tracked. |
| Constructor Summary | |
|---|---|
CacheActionStruct()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int action
enumerated constant values:
UNDEFINED("please specify a value") = 0CHANGED("changed") = 1DELETED("deleted") = 2DUMPED("dumped") = 3REGISTER("register") = 4UNREGISTER("unregister") = 5protected long uniqueID
Wildcarding: For UNREGISTER actions only, this field may
be set to -1, meaning that any registrations matching the messageClass
and source will be removed.
Wildcard matching on REGISTER actions is not allowed because
the CacheManager would need to iterate and match instead of using
a direct lookup. It also tends to cause unnecessary messaging.
If your application requires significant pre-fetch caching, we
recommend creating an appropriate struct declaration to hold the
working set, and then handle cache registration local to the
CacheManagerNode so that the multiple registration calls are
handled locally.
protected java.lang.String messageClass
Wildcarding: For UNREGISTER actions only, this field may be
set to null or "", meaning that any registrations matching the source
will be removed.
protected long revisionNumber
protected java.lang.String[] sources
getNodeInstance().getNodeInstanceName();
Within the CacheManager, this field serves as a reference count
for the number of subscribers for a given notification, while
supporting wildcard deregistration.
| Constructor Detail |
|---|
public CacheActionStruct()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||