[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Brian Stansberry
brian.stansberry at jboss.com
Sun Aug 13 16:10:12 EDT 2006
User: bstansberry
Date: 06/08/13 16:10:12
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0_MUX
EvictionInterceptor.java
OptimisticValidatorInterceptor.java
OptimisticNodeInterceptor.java
Log:
Update to 1.4.0.SP1
Revision Changes Path
No revision
No revision
1.3.4.1 +2 -1 JBossCache/src/org/jboss/cache/interceptors/EvictionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/EvictionInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -b -r1.3 -r1.3.4.1
--- EvictionInterceptor.java 16 May 2006 22:42:26 -0000 1.3
+++ EvictionInterceptor.java 13 Aug 2006 20:10:12 -0000 1.3.4.1
@@ -26,7 +26,7 @@
* This interceptor is used to handle eviction events.
*
* @author Daniel Huang
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.3.4.1 $
*/
public class EvictionInterceptor extends Interceptor
{
@@ -111,6 +111,7 @@
if (event == null)
{
// no node modifications.
+ if (log.isTraceEnabled()) log.trace("No node modifications");
return;
}
1.25.4.1 +10 -0 JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticValidatorInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java,v
retrieving revision 1.25
retrieving revision 1.25.4.1
diff -u -b -r1.25 -r1.25.4.1
--- OptimisticValidatorInterceptor.java 6 Jun 2006 10:17:14 -0000 1.25
+++ OptimisticValidatorInterceptor.java 13 Aug 2006 20:10:12 -0000 1.25.4.1
@@ -155,8 +155,12 @@
// short circuit if this node is deleted?
if (wrappedNode.isDeleted())
{
+ // handle notifications
+
if (trace) log.trace("Workspace node " + wrappedNode.getFqn() + " deleted; removing");
DataNode dNode = wrappedNode.getNode();
+ cache.notifyNodeRemove(dNode.getFqn(), true);
+
if (dNode.getFqn().isRoot())
{
log.warn("Attempted to delete the root node");
@@ -166,6 +170,8 @@
DataNode parent = (DataNode) dNode.getParent();
parent.removeChild( dNode.getName() );
}
+ cache.notifyNodeRemoved(dNode.getFqn());
+ cache.notifyNodeRemove(dNode.getFqn(), false);
}
else
{
@@ -173,6 +179,7 @@
// if (wrappedNode.hasCreatedOrRemovedChildren() handleChildNodes(wrappedNode);
if (wrappedNode.isDirty())
{
+ cache.notifyNodeModify(wrappedNode.getFqn(), true);
OptimisticTreeNode current = (OptimisticTreeNode) wrappedNode.getNode();
Map mergedChildren = wrappedNode.getMergedChildren();
@@ -192,10 +199,13 @@
current.setVersion(wrappedNode.getVersion());
}
if (trace) log.trace("Setting version of node " + current.getName() + " from " + wrappedNode.getVersion() + " to " + current.getVersion());
+ cache.notifyNodeModified(wrappedNode.getFqn());
+ cache.notifyNodeModify(wrappedNode.getFqn(), false);
}
else
{
if (trace) log.trace("Merging node " + wrappedNode.getFqn() + " not necessary since the node is not dirty");
+ cache.notifyNodeVisited(wrappedNode.getFqn());
}
}
}
1.21.4.1 +4 -0 JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticNodeInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -u -b -r1.21 -r1.21.4.1
--- OptimisticNodeInterceptor.java 12 Jun 2006 20:24:31 -0000 1.21
+++ OptimisticNodeInterceptor.java 13 Aug 2006 20:10:12 -0000 1.21.4.1
@@ -120,6 +120,10 @@
case MethodDeclarations.getNodeMethodLocal_id:
result = getNode(args, workspace);
break;
+ case MethodDeclarations.evictNodeMethodLocal_id:
+ case MethodDeclarations.evictVersionedNodeMethodLocal_id:
+ result = super.invoke(m);
+ break;
default:
if (log.isInfoEnabled()) log.info("read Method " + m + " called - don't know how to handle, passing on!");
result = super.invoke(m);
More information about the jboss-cvs-commits
mailing list