JBoss Cache SVN: r6517 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 11:47:28 -0400 (Tue, 05 Aug 2008)
New Revision: 6517
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jbosscache-core.jar
Log:
UPdated to CR7
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jbosscache-core.jar
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Cache SVN: r6516 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/lib.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 11:45:40 -0400 (Tue, 05 Aug 2008)
New Revision: 6516
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/lib/jbosscache-core.jar
Log:
Updated to A2
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/lib/jbosscache-core.jar
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Cache SVN: r6515 - in core/tags/3.0.0.ALPHA2: src/main/java/org/jboss/cache and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 11:23:08 -0400 (Tue, 05 Aug 2008)
New Revision: 6515
Modified:
core/tags/3.0.0.ALPHA2/pom.xml
core/tags/3.0.0.ALPHA2/src/main/java/org/jboss/cache/Version.java
Log:
Alpha2
Modified: core/tags/3.0.0.ALPHA2/pom.xml
===================================================================
--- core/tags/3.0.0.ALPHA2/pom.xml 2008-08-05 15:20:40 UTC (rev 6514)
+++ core/tags/3.0.0.ALPHA2/pom.xml 2008-08-05 15:23:08 UTC (rev 6515)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
- <jbosscache-core-version>3.0.0-SNAPSHOT</jbosscache-core-version>
+ <jbosscache-core-version>3.0.0.ALPHA2</jbosscache-core-version>
<!-- By default only run tests in the "unit" group -->
<defaultTestGroup>unit</defaultTestGroup>
<!-- By default only generate Javadocs when we install the module. -->
@@ -398,7 +398,7 @@
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <jbosscache-core-version>3.0.0-SNAPSHOT-JBossAS</jbosscache-core-version>
+ <jbosscache-core-version>3.0.0.ALPHA2-JBossAS</jbosscache-core-version>
</properties>
<dependencies>
<dependency>
Modified: core/tags/3.0.0.ALPHA2/src/main/java/org/jboss/cache/Version.java
===================================================================
--- core/tags/3.0.0.ALPHA2/src/main/java/org/jboss/cache/Version.java 2008-08-05 15:20:40 UTC (rev 6514)
+++ core/tags/3.0.0.ALPHA2/src/main/java/org/jboss/cache/Version.java 2008-08-05 15:23:08 UTC (rev 6515)
@@ -11,10 +11,10 @@
@Immutable
public class Version
{
- public static final String version = "3.0.0-SNAPSHOT";
+ public static final String version = "3.0.0.ALPHA2";
public static final String codename = "Naga";
//public static final String cvs = "$Id: Version.java 4592 2007-10-10 16:44:36Z manik.surtani(a)jboss.com $";
- static final byte[] version_id = {'0', '3', '0', '0', 'S'};
+ static final byte[] version_id = {'0', '3', '0', '0', 'A', '2'};
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
16 years, 5 months
JBoss Cache SVN: r6514 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 11:20:40 -0400 (Tue, 05 Aug 2008)
New Revision: 6514
Added:
core/tags/3.0.0.ALPHA2/
Log:
Copied: core/tags/3.0.0.ALPHA2 (from rev 6513, core/trunk)
16 years, 5 months
JBoss Cache SVN: r6513 - core/trunk/src/main/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 08:45:08 -0400 (Tue, 05 Aug 2008)
New Revision: 6513
Modified:
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
Log:
Added proper exception propagation during buddy remote comms
use Cache.getRoot() instead of DataContainer.getRoot()
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-08-05 12:43:23 UTC (rev 6512)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-08-05 12:45:08 UTC (rev 6513)
@@ -1074,7 +1074,7 @@
// where N is a number.
Fqn defunctRoot = buddyFqnTransformer.getDeadBackupRoot(dataOwner);
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
- Node<?, ?> defunctRootNode = dataContainer.getRoot().addChild(defunctRoot);
+ Node<?, ?> defunctRootNode = cache.getRoot().addChild(defunctRoot);
SortedSet<Object> childrenNames = new TreeSet<Object>(defunctRootNode.getChildrenNames()); // will be naturally sorted.
Integer childName = 1;
16 years, 5 months
JBoss Cache SVN: r6512 - in core/trunk/src/main/java/org/jboss/cache: buddyreplication and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 08:43:23 -0400 (Tue, 05 Aug 2008)
New Revision: 6512
Modified:
core/trunk/src/main/java/org/jboss/cache/DataContainer.java
core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
Log:
Added proper exception propagation during buddy remote comms
use Cache.getRoot() instead of DataContainer.getRoot()
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-08-05 11:20:47 UTC (rev 6511)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-08-05 12:43:23 UTC (rev 6512)
@@ -18,7 +18,9 @@
* Retrieves the root node.
*
* @return the root node
+ * @deprecated use Cache.getRoot();
*/
+ @Deprecated
NodeSPI getRoot();
/**
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-08-05 11:20:47 UTC (rev 6511)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-08-05 12:43:23 UTC (rev 6512)
@@ -109,6 +109,7 @@
}
}
+ @Deprecated
public NodeSPI getRoot()
{
return root;
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-08-05 11:20:47 UTC (rev 6511)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-08-05 12:43:23 UTC (rev 6512)
@@ -601,7 +601,7 @@
o = cache.getInvocationContext().getOptionOverrides();
o.setCacheModeLocal(true);
o.setSkipCacheStatusCheck(true);
- dataContainer.getRoot().addChild(Fqn.fromElements(BUDDY_BACKUP_SUBTREE, newGroup.getGroupName()));
+ cache.put(Fqn.fromElements(BUDDY_BACKUP_SUBTREE, newGroup.getGroupName()), (Map) Collections.emptyMap());
}
else
{
@@ -879,7 +879,14 @@
}
else
{
- log.error("Unable to communicate with Buddy for some reason", e);
+ if (attemptsLeft > 0)
+ {
+ log.error("Unable to communicate with Buddy for some reason", e);
+ }
+ else
+ {
+ throw new BuddyNotInitException("Unable to contact buddy after " + UNINIT_BUDDIES_RETRIES + " retries");
+ }
}
}
}
16 years, 5 months
JBoss Cache SVN: r6511 - in core/trunk/src/test/java/org/jboss/cache: commands/write and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 07:20:47 -0400 (Tue, 05 Aug 2008)
New Revision: 6511
Modified:
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java
core/trunk/src/test/java/org/jboss/cache/commands/write/InvalidateCommandTest.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
Log:
Fixed broken tests
Modified: core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java 2008-08-05 10:56:29 UTC (rev 6510)
+++ core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java 2008-08-05 11:20:47 UTC (rev 6511)
@@ -58,8 +58,8 @@
nodes.adfNode.setVersion(dataVersion);
nodes.adfNode.setDataLoaded(true);
expect(spiMock.getNode(testFqn)).andReturn(nodes.adfNode);
- notifier.notifyNodeEvicted(testFqn, true, ctx);
- notifier.notifyNodeEvicted(testFqn, false, ctx);
+ notifier.notifyNodeInvalidated(testFqn, true, ctx);
+ notifier.notifyNodeInvalidated(testFqn, false, ctx);
control.replay();
assert null == command.perform(ctx);
@@ -102,8 +102,8 @@
nodes.adfNode.setVersion(dataVersion);
expect(spiMock.getNode(testFqn)).andReturn(null);
expect(container.peek(testFqn, true, true)).andReturn(nodes.adfNode);
- notifier.notifyNodeEvicted(testFqn, true, ctx);
- notifier.notifyNodeEvicted(testFqn, false, ctx);
+ notifier.notifyNodeInvalidated(testFqn, true, ctx);
+ notifier.notifyNodeInvalidated(testFqn, false, ctx);
control.replay();
assert null == command.perform(ctx);
Modified: core/trunk/src/test/java/org/jboss/cache/commands/write/InvalidateCommandTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/commands/write/InvalidateCommandTest.java 2008-08-05 10:56:29 UTC (rev 6510)
+++ core/trunk/src/test/java/org/jboss/cache/commands/write/InvalidateCommandTest.java 2008-08-05 11:20:47 UTC (rev 6511)
@@ -1,15 +1,15 @@
package org.jboss.cache.commands.write;
-import static org.easymock.EasyMock.*;
-import org.testng.annotations.Test;
-import org.jboss.cache.notifications.Notifier;
-import org.jboss.cache.mock.MockNodesFixture;
+import static org.easymock.EasyMock.createStrictControl;
+import static org.easymock.EasyMock.expect;
+import org.easymock.IMocksControl;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.DataContainer;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.commands.read.AbstractDataCommandTest;
-import org.easymock.IMocksControl;
-import static org.easymock.EasyMock.createStrictControl;
+import org.jboss.cache.mock.MockNodesFixture;
+import org.jboss.cache.notifications.Notifier;
+import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
@@ -53,9 +53,9 @@
public void testExistingNode()
{
expect(spiMock.getNode(testFqn)).andReturn(nodes.adfNode);
- notifier.notifyNodeEvicted(testFqn, true, ctx);
+ notifier.notifyNodeInvalidated(testFqn, true, ctx);
expect(container.evict(testFqn)).andReturn(Boolean.TRUE);
- notifier.notifyNodeEvicted(testFqn, false, ctx);
+ notifier.notifyNodeInvalidated(testFqn, false, ctx);
control.replay();
assert null == command.perform(ctx);
assert !nodes.adfNode.isValid() : "node should had been invalidated";
@@ -67,11 +67,11 @@
public void testRootNodeInvalidation()
{
command.setFqn(Fqn.ROOT);
- nodes.adfgNode.put("key","value");
+ nodes.adfgNode.put("key", "value");
expect(spiMock.getNode(Fqn.ROOT)).andReturn(nodes.root);
- notifier.notifyNodeEvicted(Fqn.ROOT, true, ctx);
+ notifier.notifyNodeInvalidated(Fqn.ROOT, true, ctx);
expect(container.evict(Fqn.ROOT)).andReturn(Boolean.TRUE);
- notifier.notifyNodeEvicted(Fqn.ROOT, false, ctx);
+ notifier.notifyNodeInvalidated(Fqn.ROOT, false, ctx);
control.replay();
assert null == command.perform(ctx);
assert nodes.root.isValid() : "root should NOT had been invalidated";
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-08-05 10:56:29 UTC (rev 6510)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-08-05 11:20:47 UTC (rev 6511)
@@ -16,6 +16,7 @@
import org.jboss.cache.marshall.RegionalizedMethodCall;
import org.jboss.cache.util.TestingUtil;
import org.jgroups.blocks.RpcDispatcher;
+import org.jgroups.util.Buffer;
import java.io.InputStream;
import java.io.ObjectInputStream;
@@ -68,17 +69,17 @@
}
else
{
- RpcDispatcher.Marshaller realMarshaller = (RpcDispatcher.Marshaller) TestingUtil.extractField(RpcDispatcher.class, realDispatcher, "req_marshaller");
+ RpcDispatcher.Marshaller2 realMarshaller = (RpcDispatcher.Marshaller2) TestingUtil.extractField(RpcDispatcher.class, realDispatcher, "req_marshaller");
MarshallerDelegate delegate = new MarshallerDelegate(realMarshaller);
TestingUtil.replaceField(delegate, "req_marshaller", realDispatcher, RpcDispatcher.class);
}
}
- private class MarshallerDelegate implements RpcDispatcher.Marshaller
+ private class MarshallerDelegate implements RpcDispatcher.Marshaller2
{
- RpcDispatcher.Marshaller marshaller;
+ RpcDispatcher.Marshaller2 marshaller;
- private MarshallerDelegate(RpcDispatcher.Marshaller marshaller)
+ private MarshallerDelegate(RpcDispatcher.Marshaller2 marshaller)
{
this.marshaller = marshaller;
}
@@ -98,6 +99,22 @@
}
return result;
}
+
+ public Buffer objectToBuffer(Object o) throws Exception
+ {
+ return marshaller.objectToBuffer(o);
+ }
+
+ public Object objectFromByteBuffer(byte[] bytes, int i, int i1) throws Exception
+ {
+ Object result = marshaller.objectFromByteBuffer(bytes, i, i1);
+ if (result instanceof ReplicateCommand && expectedCommands != null)
+ {
+ ReplicateCommand replicateCommand = (ReplicateCommand) result;
+ return new ReplicateCommandDelegate(replicateCommand);
+ }
+ return result;
+ }
}
/**
16 years, 5 months
JBoss Cache SVN: r6510 - core/trunk/src/test/java/org/jboss/cache/util/internals.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 06:56:29 -0400 (Tue, 05 Aug 2008)
New Revision: 6510
Modified:
core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java
Log:
removed unnecessary brittle reflection call
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java 2008-08-05 10:50:47 UTC (rev 6509)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java 2008-08-05 10:56:29 UTC (rev 6510)
@@ -5,14 +5,13 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.EvictionTimerTask;
import org.jboss.cache.eviction.LRUConfiguration;
+import org.jboss.cache.util.TestingUtil;
import java.lang.reflect.Method;
-import java.util.Timer;
/**
* when used on a cache will disable defaul eviction behavior and it will supply means of kicking off evction
@@ -40,8 +39,7 @@
{
throw new IllegalStateException("No timer task!!!");
}
- Timer evictionThread = (Timer) TestingUtil.extractField(timerTask, "evictionThread");
- evictionThread.cancel();
+ timerTask.stop();
}
public void startEviction()
16 years, 5 months
JBoss Cache SVN: r6509 - in core/trunk/src: test/java/org/jboss/cache/notifications and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 06:50:47 -0400 (Tue, 05 Aug 2008)
New Revision: 6509
Modified:
core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
core/trunk/src/test/java/org/jboss/cache/notifications/NotifierAnnotationsTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/NotifierTest.java
Log:
Notifier fixes
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java 2008-08-05 10:42:48 UTC (rev 6508)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java 2008-08-05 10:50:47 UTC (rev 6509)
@@ -122,34 +122,28 @@
listenersMap.put(NodeInvalidated.class, nodeInvalidatedListeners);
}
- public NotifierImpl(Cache cache)
- {
- this();
- this.cache = cache;
- }
-
@Inject
- private void injectDependencies(CacheSPI cache, Configuration config)
+ void injectDependencies(CacheSPI cache, Configuration config)
{
this.cache = cache;
this.config = config;
}
@Stop
- private void stop()
+ void stop()
{
syncProcessor.shutdownNow();
asyncProcessor.shutdownNow();
}
@Destroy
- protected void destroy()
+ void destroy()
{
removeAllCacheListeners();
}
@Start
- protected void start()
+ void start()
{
useMarshalledValueMaps = config.isUseLazyDeserialization();
syncProcessor = new WithinThreadExecutor();
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/NotifierAnnotationsTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/NotifierAnnotationsTest.java 2008-08-05 10:42:48 UTC (rev 6508)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/NotifierAnnotationsTest.java 2008-08-05 10:50:47 UTC (rev 6509)
@@ -1,7 +1,8 @@
package org.jboss.cache.notifications;
-import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
+import static org.easymock.EasyMock.createNiceMock;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.CacheStarted;
import org.jboss.cache.notifications.annotation.CacheStopped;
@@ -9,6 +10,7 @@
import org.jboss.cache.notifications.event.Event;
import org.jboss.cache.notifications.event.NodeMovedEvent;
import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -28,10 +30,18 @@
@BeforeMethod(alwaysRun = true)
public void setUp()
{
- Cache c = new DefaultCacheFactory<Object, Object>().createCache(false);
- n = new NotifierImpl(c);
+ n = new NotifierImpl();
+ n.injectDependencies(createNiceMock(CacheSPI.class), new Configuration());
+ n.start();
}
+ @AfterMethod
+ public void tearDown()
+ {
+ n.stop();
+ n.destroy();
+ }
+
public void testControl()
{
Object l = new TestControlListener();
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/NotifierTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/NotifierTest.java 2008-08-05 10:42:48 UTC (rev 6508)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/NotifierTest.java 2008-08-05 10:50:47 UTC (rev 6509)
@@ -1,14 +1,16 @@
package org.jboss.cache.notifications;
import static org.easymock.EasyMock.createNiceMock;
-import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.buddyreplication.BuddyGroup;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.invocation.InvocationContext;
import org.jboss.cache.invocation.LegacyInvocationContext;
import org.jboss.cache.notifications.annotation.*;
import org.jboss.cache.notifications.event.*;
import org.jgroups.View;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -26,7 +28,6 @@
public class NotifierTest
{
private NotifierImpl notifier;
- private Cache cache;
private InvocationContext ctx;
private AllEventsListener allEventsListener;
private Fqn fqn = Fqn.fromString("/a/b/c");
@@ -34,13 +35,21 @@
@BeforeMethod
public void setUp()
{
- cache = createNiceMock(Cache.class);
- notifier = new NotifierImpl(cache);
+ notifier = new NotifierImpl();
+ notifier.injectDependencies(createNiceMock(CacheSPI.class), new Configuration());
+ notifier.start();
ctx = new LegacyInvocationContext(null);
allEventsListener = new AllEventsListener();
notifier.addCacheListener(allEventsListener);
}
+ @AfterMethod
+ public void tearDown()
+ {
+ notifier.stop();
+ notifier.destroy();
+ }
+
public void testNotifyNodeCreated()
{
assert allEventsListener.nodeCreatedEvent == null;
@@ -60,7 +69,7 @@
public void testNotifyNodeModified()
{
assert allEventsListener.nodeModifiedEvent == null;
- Map expected = new HashMap();
+ Map<String, String> expected = new HashMap<String, String>();
expected.put("k", "v");
notifier.notifyNodeModified(fqn, true, NodeModifiedEvent.ModificationType.PUT_DATA, expected, ctx);
assert allEventsListener.nodeModifiedEvent != null;
@@ -71,7 +80,7 @@
public void testNotifyNodeRemoved()
{
assert allEventsListener.nodeRemoveEvent == null;
- Map data = new HashMap();
+ Map<String, String> data = new HashMap<String, String>();
data.put("k", "v");
notifier.notifyNodeRemoved(fqn, true, data, ctx);
assert allEventsListener.nodeRemoveEvent != null;
@@ -110,7 +119,7 @@
public void testNotifyNodeLoaded()
{
assert allEventsListener.nodeLoadedEvent == null;
- Map expected = new HashMap();
+ Map<String, String> expected = new HashMap<String, String>();
expected.put("key", "value");
notifier.notifyNodeLoaded(fqn, true, expected, ctx);
assert allEventsListener.nodeLoadedEvent != null;
@@ -122,7 +131,7 @@
public void testNotifyNodeActivated()
{
assert allEventsListener.nodeActivatedEvent == null;
- Map expected = new HashMap();
+ Map<String, String> expected = new HashMap<String, String>();
expected.put("key", "value");
notifier.notifyNodeActivated(fqn, true, expected, ctx);
assert allEventsListener.nodeActivatedEvent != null;
@@ -134,7 +143,7 @@
public void testNotifyNodePassivated()
{
assert allEventsListener.nodePassivatedEvent == null;
- Map expected = new HashMap();
+ Map<String, String> expected = new HashMap<String, String>();
expected.put("key", "value");
notifier.notifyNodePassivated(fqn, true, expected, ctx);
assert allEventsListener.nodePassivatedEvent != null;
16 years, 5 months
JBoss Cache SVN: r6508 - core/trunk/src/test/java/org/jboss/cache/options.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-05 06:42:48 -0400 (Tue, 05 Aug 2008)
New Revision: 6508
Modified:
core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
Log:
Corrected to deal with new callback
Modified: core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java 2008-08-05 10:37:26 UTC (rev 6507)
+++ core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java 2008-08-05 10:42:48 UTC (rev 6508)
@@ -17,7 +17,7 @@
import org.jboss.cache.config.Configuration.NodeLockingScheme;
import org.jboss.cache.config.Option;
import org.jboss.cache.notifications.annotation.CacheListener;
-import org.jboss.cache.notifications.annotation.NodeEvicted;
+import org.jboss.cache.notifications.annotation.NodeInvalidated;
import org.jboss.cache.notifications.annotation.NodeModified;
import org.jboss.cache.notifications.annotation.NodeRemoved;
import org.jboss.cache.notifications.event.NodeEvent;
@@ -456,11 +456,11 @@
@NodeModified
@NodeRemoved
- @NodeEvicted
+ @NodeInvalidated
public void block(NodeEvent event)
{
log.error("Received event notification " + event);
- if (event.isPre() == false && FQNA.equals(event.getFqn()))
+ if (!event.isPre() && FQNA.equals(event.getFqn()))
{
blocked = true;
try
16 years, 5 months