Author: manik.surtani(a)jboss.com
Date: 2008-01-31 13:56:11 -0500 (Thu, 31 Jan 2008)
New Revision: 5284
Modified:
core/tags/2.1.0.CR2B/src/main/java/org/jboss/cache/notifications/Notifier.java
Log:
Modified: core/tags/2.1.0.CR2B/src/main/java/org/jboss/cache/notifications/Notifier.java
===================================================================
---
core/tags/2.1.0.CR2B/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-01-31
18:50:02 UTC (rev 5283)
+++
core/tags/2.1.0.CR2B/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-01-31
18:56:11 UTC (rev 5284)
@@ -232,14 +232,13 @@
*/
public void notifyNodeModified(Fqn fqn, boolean pre,
NodeModifiedEvent.ModificationType modificationType, Map data, InvocationContext ctx)
{
- boolean originLocal = ctx.isOriginLocal();
- Map dataCopy = copy(data);
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeModified.class);
if (listeners != null && listeners.size() > 0)
{
+ boolean originLocal = ctx.isOriginLocal();
+ Map dataCopy = copy(data);
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -265,14 +264,14 @@
*/
public void notifyNodeRemoved(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
{
- boolean originLocal = ctx.isOriginLocal();
- Map dataCopy = copy(data);
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeRemoved.class);
if (listeners != null && listeners.size() > 0)
{
+ boolean originLocal = ctx.isOriginLocal();
+ Map dataCopy = copy(data);
+ Transaction tx = ctx.getTransaction();
+
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -296,12 +295,11 @@
*/
public void notifyNodeVisited(Fqn fqn, boolean pre, InvocationContext ctx)
{
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeVisited.class);
if (listeners != null && listeners.size() > 0)
{
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -316,13 +314,12 @@
public void notifyNodeMoved(Fqn originalFqn, Fqn newFqn, boolean pre,
InvocationContext ctx)
{
- boolean originLocal = ctx.isOriginLocal();
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeMoved.class);
if (listeners != null && listeners.size() > 0)
{
+ boolean originLocal = ctx.isOriginLocal();
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -347,13 +344,12 @@
*/
public void notifyNodeEvicted(final Fqn fqn, final boolean pre, InvocationContext
ctx)
{
- final boolean originLocal = ctx.isOriginLocal();
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeEvicted.class);
if (listeners != null && listeners.size() > 0)
{
+ final boolean originLocal = ctx.isOriginLocal();
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -377,14 +373,13 @@
*/
public void notifyNodeLoaded(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
{
- boolean originLocal = ctx.isOriginLocal();
- Map dataCopy = copy(data);
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeLoaded.class);
if (listeners != null && listeners.size() > 0)
{
+ boolean originLocal = ctx.isOriginLocal();
+ Map dataCopy = copy(data);
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -409,14 +404,13 @@
*/
public void notifyNodeActivated(Fqn fqn, boolean pre, Map data, InvocationContext
ctx)
{
- boolean originLocal = ctx.isOriginLocal();
- Map dataCopy = copy(data);
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodeActivated.class);
if (listeners != null && listeners.size() > 0)
{
+ boolean originLocal = ctx.isOriginLocal();
+ Map dataCopy = copy(data);
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -441,13 +435,12 @@
*/
public void notifyNodePassivated(Fqn fqn, boolean pre, Map data, InvocationContext
ctx)
{
- Map dataCopy = copy(data);
- Transaction tx = ctx.getTransaction();
-
List<ListenerInvocation> listeners =
listenerInvocations.get(NodePassivated.class);
if (listeners != null && listeners.size() > 0)
{
+ Map dataCopy = copy(data);
+ Transaction tx = ctx.getTransaction();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -534,12 +527,11 @@
*/
public void notifyTransactionCompleted(Transaction transaction, boolean successful,
InvocationContext ctx)
{
- Transaction tx = ctx.getTransaction();
- boolean isOriginLocal = ctx.isOriginLocal();
List<ListenerInvocation> listeners =
listenerInvocations.get(TransactionCompleted.class);
-
if (listeners != null && listeners.size() > 0)
{
+ Transaction tx = ctx.getTransaction();
+ boolean isOriginLocal = ctx.isOriginLocal();
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);
@@ -559,12 +551,13 @@
*/
public void notifyTransactionRegistered(Transaction transaction, InvocationContext
ctx)
{
- Transaction tx = ctx.getTransaction();
- boolean isOriginLocal = ctx.isOriginLocal();
List<ListenerInvocation> listeners =
listenerInvocations.get(TransactionRegistered.class);
if (listeners != null && listeners.size() > 0)
{
+ Transaction tx = ctx.getTransaction();
+ boolean isOriginLocal = ctx.isOriginLocal();
+
InvocationContext backup = resetInvocationContext(ctx);
EventImpl e = new EventImpl();
e.setCache(cache);