protected final class JcrSession.JcrPreSave extends Object implements SessionCache.PreSave
Modifier | Constructor and Description |
---|---|
protected |
JcrSession.JcrPreSave(SystemContent content,
Map<NodeKey,NodeKey> baseVersionKeys,
Map<NodeKey,NodeKey> originalVersionKeys,
long aclChangesCount) |
Modifier and Type | Method and Description |
---|---|
void |
process(MutableCachedNode node,
SessionCache.SaveContext context)
Process the supplied node prior to saving the changes.
|
void |
processAfterLocking(MutableCachedNode modifiedNode,
SessionCache.SaveContext context,
NodeCache persistentNodeCache)
Process the supplied existing node prior to saving the changes but only after the entry corresponding to the key of the
node has been locked in Infinispan.
|
public void process(MutableCachedNode node, SessionCache.SaveContext context) throws Exception
SessionCache.PreSave
process
in interface SessionCache.PreSave
node
- 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 processingpublic void processAfterLocking(MutableCachedNode modifiedNode, SessionCache.SaveContext context, NodeCache persistentNodeCache) throws RepositoryException
SessionCache.PreSave
LockingMode.PESSIMISTIC
flag is enabled. This method should be implemented as
optimal as possible and should only be needed in multi-threaded scenarios where concurrent modifications may break
consistency.processAfterLocking
in interface SessionCache.PreSave
modifiedNode
- the mutable node that was changed in this session; never nullcontext
- the context of the save operation; never nullpersistentNodeCache
- the node cache from which the persistent representation of the nodes can be obtained; never
nullRepositoryException
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.