public static interface SessionCache.PreSave
SessionCache.save(SessionCache, PreSave)
and
SessionCache.save(Set, SessionCache, PreSave)
, allowing the caller to receive a hook where they can interrogate
each of the changed nodes and perform additional logic prior to the actual persisting of the changes. Note that
implementations are free to make additional modifications to the supplied nodes, and even create additional nodes or change
persistent but unchanged nodes, as long as these operations are done within the same calling thread.Modifier and Type | Method and Description |
---|---|
void |
processAfterLocking(MutableCachedNode modifiedNode,
SessionCache.SaveContext context)
Process the supplied existing node prior to saving the changes but only after the entry corresponding to the key of the
node has been exclusively locked.
|
void |
processBeforeLocking(MutableCachedNode modifiedOrNewNode,
SessionCache.SaveContext context)
Process the supplied node prior to saving the changes.
|
void processBeforeLocking(MutableCachedNode modifiedOrNewNode, SessionCache.SaveContext context) throws Exception
modifiedOrNewNode
- the mutable node that was changed in this session; never nullcontext
- the context of the save operation; never nullException
- if there is a problem during the processingvoid processAfterLocking(MutableCachedNode modifiedNode, SessionCache.SaveContext context) throws Exception
modifiedNode
- the mutable node that was changed in this session; never nullcontext
- the context of the save operation; never nullException
- if there is a problem during the processingCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.