|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sandev.basics.structs.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.
Security considerations:
CacheActions do not contain instance data, and in many cases
innapropriate display of changed information is not a problem. For
example if the cached information is public, then presumably change
notifications for that information would also be public. Alternatively,
if the cached information is used only between trusted nodes, then
the changed notification is also trusted.
In all other cases, security for CacheActions is handled like any message using an AuthFilter from the application Authorizer. Details are application specific, but for example:
messageClassAccess can restrict access to CacheAction
messages within known authorized users.
messageInstanceAccess can restrict delivery of
CacheActions to known sources. For assistance with filtering and security issues contact
Structs And Nodes Development Services.
Wildcarding:
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()
|
|
| 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 = 0_CHANGED = 1_DELETED = 2_DUMPED = 3_REGISTER = 4_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 | |||||||||