[jbosscache-commits] JBoss Cache SVN: r7617 - in core/branches/flat/src: main/java/org/horizon/config and 10 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Jan 30 12:06:45 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-01-30 12:06:45 -0500 (Fri, 30 Jan 2009)
New Revision: 7617

Modified:
   core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java
   core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java
   core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java
   core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java
   core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java
   core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
   core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java
   core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java
   core/branches/flat/src/main/java/org/horizon/lock/LockManager.java
   core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java
   core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java
   core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java
   core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java
   core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java
   core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java
   core/branches/flat/src/test/java/org/horizon/api/mvcc/PutForExternalReadTest.java
   core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java
   core/branches/flat/src/test/java/org/horizon/replication/SyncCacheListenerTest.java
Log:
Javadocs, comments, variable names

Modified: core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -70,8 +70,7 @@
     *
     * @param context invocation context, ignored.
     * @return a List containing 2 elements: a boolean, (true or false) and a value (Object) which is the result of
-    *         invoking a remote get specified by {@link #getDataCommand()}.  If buddy replication is used one further
-    *         element is added - an Fqn of the backup subtree in which this node may be found.
+    *         invoking a remote get specified by {@link #getDataCommand()}.
     */
    public Object perform(InvocationContext context) throws Throwable {
       if (trace)

Modified: core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -52,7 +52,7 @@
 
    public EvictionConfig() {
 //      evictionCacheConfigs = new LinkedList<EvictionCacheConfig>();
-//      defaultEvictionCacheConfig = new EvictionCacheConfig(Fqn.ROOT);
+//      defaultEvictionCacheConfig = new EvictionCacheConfig(ROOT);
 //      defaultEvictionCacheConfig.setEventQueueSize(EVENT_QUEUE_SIZE_DEFAULT);
 //      defaultEvictionCacheConfig.setEvictionActionClassName(DefaultEvictionAction.class.getName());
    }
@@ -196,10 +196,6 @@
    }
 
 
-   /**
-    * Returns the <code>EvictionRegionConfig</code> coresponding to given region fqn, or <code>null</code> if no match
-    * is found.
-    */
    public EvictionCacheConfig getEvictionRegionConfig(String region) {
       return null;
    }

Modified: core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -57,9 +57,6 @@
    /**
     * LinkedHashSet of locks acquired by the invocation. We use a LinkedHashSet because we need efficient Set semantics
     * but also need guaranteed ordering for use by lock release code (see JBCCACHE-874).
-    * <p/>
-    * This needs to be unchecked since we support both MVCC (Fqns held here) or legacy Opt/Pess locking (NodeLocks held
-    * here). once we drop support for opt/pess locks we can genericise this to contain Fqns. - Manik Surtani, June 2008
     */
    protected LinkedHashSet<Object> invocationLocks;
    private FastCopyHashMap<Object, MVCCEntry> lookedUpEntries = null;

Modified: core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -71,18 +71,18 @@
    List<VisitableCommand> getLocalModifications();
 
    /**
-    * Adds the node that has been removed in the scope of the current transaction.
+    * Adds the key that has been removed in the scope of the current transaction.
     *
-    * @param key fqn that has been removed.
-    * @throws NullPointerException if the Fqn is null.
+    * @param key key that has been removed.
+    * @throws NullPointerException if the key is null.
     */
    void addRemovedEntry(Object key);
 
    /**
-    * Gets the list of removed nodes.
+    * Gets the list of removed keys.
     *
-    * @return list of nodes removed in the current transaction scope.  Note that this method will return an empty list
-    *         if nothing has been removed.  The list returned is defensively copied.
+    * @return list of keys of entries removed in the current transaction scope.  Note that this method will return an
+    *         empty list if nothing has been removed.  The list returned is defensively copied.
     */
    List<Object> getRemovedEntries();
 
@@ -194,14 +194,14 @@
    void setForceSyncReplication(boolean forceSyncReplication);
 
    /**
-    * Adds an Fqn to the list of uninitialized nodes created by the cache loader.
+    * Adds a key to the list of uninitialized entry keys created by the cache loader.
     *
-    * @param key fqn to add.  Must not be null.
+    * @param key key to add.  Must not be null.
     */
    void addDummyEntryCreatedByCacheLoader(Object key);
 
    /**
-    * @return a list of uninitialized nodes created by the cache loader, or an empty list.
+    * @return a list of uninitialized entries created by the cache loader, or an empty list.
     */
    List<Object> getDummyEntriesCreatedByCacheLoader();
 

Modified: core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -66,22 +66,19 @@
    /**
     * LinkedHashSet of locks acquired by the transaction. We use a LinkedHashSet because we need efficient Set semantics
     * but also need guaranteed ordering for use by lock release code (see JBCCACHE-874).
-    * <p/>
-    * This needs to be unchecked since we support both MVCC (Fqns held here) or legacy Opt/Pess locking (NodeLocks held
-    * here). once we drop support for opt/pess locks we can genericise this to contain Fqns. - Manik Surtani, June 2008
     */
    private LinkedHashSet<Object> transactionLocks;
 
    /**
-    * A list of dummy uninitialised nodes created by the cache loader interceptor to load data for a given node in this
-    * tx.
+    * A list of dummy uninitialised entries created by the cache loader interceptor to load data for a given entry in
+    * this tx.
     */
-   private List<Object> dummyNodesCreatedByCacheLoader;
+   private List<Object> dummyEntriesCreatedByCacheLoader;
 
    /**
-    * List<Fqn> of nodes that have been removed by the transaction
+    * List<Object> of keys that have been removed by the transaction
     */
-   private List<Object> removedNodes = null;
+   private List<Object> removedKeys = null;
 
    private final FastCopyHashMap<Object, MVCCEntry> lookedUpEntries = new FastCopyHashMap<Object, MVCCEntry>(8);
    private GlobalTransaction gtx;
@@ -115,8 +112,8 @@
       localModifications = null;
       option = null;
       if (transactionLocks != null) transactionLocks.clear();
-      if (dummyNodesCreatedByCacheLoader != null) dummyNodesCreatedByCacheLoader.clear();
-      if (removedNodes != null) removedNodes.clear();
+      if (dummyEntriesCreatedByCacheLoader != null) dummyEntriesCreatedByCacheLoader.clear();
+      if (removedKeys != null) removedKeys.clear();
       lookedUpEntries.clear();
    }
 
@@ -153,13 +150,13 @@
 
    public void addRemovedEntry(Object key) {
       if (key == null) throw new NullPointerException("Key is null!");
-      if (removedNodes == null) removedNodes = new LinkedList<Object>();
-      removedNodes.add(key);
+      if (removedKeys == null) removedKeys = new LinkedList<Object>();
+      removedKeys.add(key);
    }
 
    public List<Object> getRemovedEntries() {
-      if (removedNodes == null) return Collections.emptyList();
-      return new ArrayList<Object>(removedNodes);
+      if (removedKeys == null) return Collections.emptyList();
+      return new ArrayList<Object>(removedKeys);
    }
 
    public void setTransaction(Transaction tx) {
@@ -240,14 +237,14 @@
    }
 
    public void addDummyEntryCreatedByCacheLoader(Object key) {
-      if (dummyNodesCreatedByCacheLoader == null)
-         dummyNodesCreatedByCacheLoader = new LinkedList<Object>();
-      dummyNodesCreatedByCacheLoader.add(key);
+      if (dummyEntriesCreatedByCacheLoader == null)
+         dummyEntriesCreatedByCacheLoader = new LinkedList<Object>();
+      dummyEntriesCreatedByCacheLoader.add(key);
    }
 
    public List<Object> getDummyEntriesCreatedByCacheLoader() {
-      if (dummyNodesCreatedByCacheLoader == null) return Collections.emptyList();
-      return dummyNodesCreatedByCacheLoader;
+      if (dummyEntriesCreatedByCacheLoader == null) return Collections.emptyList();
+      return dummyEntriesCreatedByCacheLoader;
    }
 
    public void setOption(Option o) {

Modified: core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -165,7 +165,7 @@
     */
    public boolean acquireLock(InvocationContext ctx, Object key) throws InterruptedException, TimeoutException {
       // don't EVER use lockManager.isLocked() since with lock striping it may be the case that we hold the relevant
-      // lock which may be shared with another Fqn that we have a lock for already.
+      // lock which may be shared with another key that we have a lock for already.
       // nothing wrong, just means that we fail to record the lock.  And that is a problem.
       // Better to check our records and lock again if necessary.
       if (!ctx.hasLockedKey(key)) {

Modified: core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -304,11 +304,11 @@
     * Returns all the interceptors that have the fully qualified name of their class equal with the supplied class
     * name.
     */
-   public List<CommandInterceptor> getInterceptorsWithClassName(String fqName) {
+   public List<CommandInterceptor> getInterceptorsWithClassName(String name) {
       CommandInterceptor iterator = firstInChain;
       List<CommandInterceptor> result = new ArrayList<CommandInterceptor>(2);
       while (iterator != null) {
-         if (iterator.getClass().getName().equals(fqName)) result.add(iterator);
+         if (iterator.getClass().getName().equals(name)) result.add(iterator);
          iterator = iterator.getNext();
       }
       return result;

Modified: core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -59,9 +59,9 @@
  * This interceptor acts as a replacement to the replication interceptor when the CacheImpl is configured with
  * ClusteredSyncMode as INVALIDATE.
  * <p/>
- * The idea is that rather than replicating changes to all caches in a cluster when CRUD (Create, Remove, Update,
- * Delete) methods are called, simply call evict(Fqn) on the remote caches for each changed node.  This allows the
- * remote node to look up the value in a shared cache loader which would have been updated with the changes.
+ * The idea is that rather than replicating changes to all caches in a cluster when write methods are called, simply
+ * broadcast an {@link InvalidateCommand} on the remote caches containing all keys modified.  This allows the remote
+ * cache to look up the value in a shared cache loader which would have been updated with the changes.
  *
  * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
  * @since 1.0

Modified: core/branches/flat/src/main/java/org/horizon/lock/LockManager.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/lock/LockManager.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/lock/LockManager.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -104,7 +104,7 @@
    void unlock(InvocationContext ctx);
 
    /**
-    * Tests whether a given owner owns a lock of lockType on a particular Fqn.
+    * Tests whether a given owner owns a lock of lockType on a particular cache entry.
     *
     * @param owner owner
     * @return true if the owner does own the specified lock type on the specified cache entry, false otherwise.
@@ -119,7 +119,7 @@
    boolean isLocked(Object key);
 
    /**
-    * Retrieves the write lock owner, if any, for the current Fqn.
+    * Retrieves the write lock owner, if any, for the specified cache entry.
     *
     * @return the owner of the lock, or null if not locked.
     */

Modified: core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -27,14 +27,14 @@
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 /**
- * A simple implementation of lock striping, using Fqns as the keys to lock on, primarily used to help make {@link
+ * A simple implementation of lock striping, using cache entry keys to lock on, primarily used to help make {@link
  * org.horizon.loader.CacheLoader} implemtations thread safe.
  * <p/>
  * Backed by a set of {@link java.util.concurrent.locks.ReentrantReadWriteLock} instances, and using the key hashcodes
  * to determine buckets.
  * <p/>
- * Since buckets are used, it doesn't matter that the Fqn in question is not removed from the lock map when no longer in
- * use, since the Fqn is not referenced in this class.  Rather, the hash code is used.
+ * Since buckets are used, it doesn't matter that the key in question is not removed from the lock map when no longer in
+ * use, since the key is not referenced in this class.  Rather, the hash code is used.
  * <p/>
  *
  * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
@@ -124,16 +124,19 @@
    }
 
    /**
-    * Releases locks on all fqns passed in.  Makes multiple calls to {@link #releaseLock(Object)}. This method is
+    * Releases locks on all keys passed in.  Makes multiple calls to {@link #releaseLock(Object)}. This method is
     * idempotent.
+    *
+    * @param keys keys to unlock
     */
    public void releaseAllLocks(List<Object> keys) {
       for (Object k : keys) releaseLock(k);
    }
 
    /**
-    * Acquires locks on all fqns passed in.  Makes multiple calls to {@link #acquireLock(Object, boolean)}
+    * Acquires locks on keys passed in.  Makes multiple calls to {@link #acquireLock(Object, boolean)}
     *
+    * @param keys      keys to unlock
     * @param exclusive whether locks are exclusive.
     */
    public void acquireAllLocks(List<Object> keys, boolean exclusive) {

Modified: core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -60,7 +60,6 @@
          return;
       } else if (ref > sz) {
          // if we are adding the reference to a position beyond the end of the list, make sure we expand the list first.
-         // this can happen, weirdly enough, since marshallObject() can be called recursively, such as from marshallFqn().
          for (int i = sz; i < ref; i++) referencedObjects.add(null);
       }
       referencedObjects.add(o);

Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -22,7 +22,7 @@
 package org.horizon.notifications.event;
 
 /**
- * Transactional events that additionally expose an Fqn as such events pertain to a specific cache entry.
+ * Transactional events that additionally expose a key as such events pertain to a specific cache entry.
  *
  * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
  * @since 1.0

Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -23,7 +23,6 @@
 
 import org.horizon.Cache;
 import org.horizon.remoting.transport.Address;
-import org.horizon.tree.Fqn;
 
 import javax.transaction.Transaction;
 import java.util.List;
@@ -43,19 +42,17 @@
    private Object key;
    private Transaction transaction;
    private boolean originLocal = true; // by default events all originate locally
-   private Fqn targetFqn;
    private boolean successful;
    private Type type;
    private List<Address> members;
    Address localAddress;
 
-   public EventImpl(boolean pre, Cache cache, Object key, Transaction transaction, boolean originLocal, Fqn targetFqn, boolean successful, List<Address> members, Address localAddress, Type type) {
+   public EventImpl(boolean pre, Cache cache, Object key, Transaction transaction, boolean originLocal, boolean successful, List<Address> members, Address localAddress, Type type) {
       this.pre = pre;
       this.cache = cache;
       this.key = key;
       this.transaction = transaction;
       this.originLocal = originLocal;
-      this.targetFqn = targetFqn;
       this.successful = successful;
       this.type = type;
       this.members = members;
@@ -89,10 +86,6 @@
       return originLocal;
    }
 
-   public Fqn getTargetFqn() {
-      return targetFqn;
-   }
-
    public boolean isSuccessful() {
       return successful;
    }
@@ -119,10 +112,6 @@
       this.originLocal = originLocal;
    }
 
-   public void setTargetFqn(Fqn targetFqn) {
-      this.targetFqn = targetFqn;
-   }
-
    public void setSuccessful(boolean successful) {
       this.successful = successful;
    }
@@ -145,7 +134,6 @@
       if (key != null ? !key.equals(event.key) : event.key != null) return false;
       if (localAddress != null ? !localAddress.equals(event.localAddress) : event.localAddress != null) return false;
       if (members != null ? !members.equals(event.members) : event.members != null) return false;
-      if (targetFqn != null ? !targetFqn.equals(event.targetFqn) : event.targetFqn != null) return false;
       if (transaction != null ? !transaction.equals(event.transaction) : event.transaction != null) return false;
       if (type != event.type) return false;
 
@@ -159,7 +147,6 @@
       result = 31 * result + (key != null ? key.hashCode() : 0);
       result = 31 * result + (transaction != null ? transaction.hashCode() : 0);
       result = 31 * result + (originLocal ? 1 : 0);
-      result = 31 * result + (targetFqn != null ? targetFqn.hashCode() : 0);
       result = 31 * result + (successful ? 1 : 0);
       result = 31 * result + (type != null ? type.hashCode() : 0);
       result = 31 * result + (members != null ? members.hashCode() : 0);
@@ -176,7 +163,6 @@
             ", key=" + key +
             ", transaction=" + transaction +
             ", originLocal=" + originLocal +
-            ", targetFqn=" + targetFqn +
             ", successful=" + successful +
             ", members=" + members +
             ", localAddress=" + localAddress +

Modified: core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -41,7 +41,7 @@
  * <p/>
  * a it is far more efficient than making a defensive copy and then wrapping the defensive copy in a read-only wrapper.
  * <p/>
- * Also used whenever a read-only reference List is needed (such as in Fqns).
+ * Also used whenever a read-only reference List is needed.
  * <p/>
  *
  * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)

Modified: core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -407,24 +407,6 @@
                      // don't care
                   }
                }
-
-               // TODO fix cache loader stuff
-               /*
-               CacheLoaderManager clm = spi.getCacheLoaderManager();
-               CacheLoader cl = clm == null ? null : clm.getCacheLoader();
-               if (cl != null)
-               {
-                  try
-                  {
-                     cl.remove(Fqn.ROOT);
-                  }
-                  catch (Exception e)
-                  {
-                     // don't care
-                  }
-               }
-               */
-
                spi.stop();
             }
          }

Modified: core/branches/flat/src/test/java/org/horizon/api/mvcc/PutForExternalReadTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/api/mvcc/PutForExternalReadTest.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/test/java/org/horizon/api/mvcc/PutForExternalReadTest.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -142,8 +142,8 @@
       tm1.resume(t);
       tm1.commit();
 
-      assertEquals("parent fqn tx should have completed", value, cache1.get(key + "0"));
-      assertEquals("parent fqn tx should have completed", value, cache2.get(key + "0"));
+      assertEquals("tx should have completed", value, cache1.get(key + "0"));
+      assertEquals("tx should have completed", value, cache2.get(key + "0"));
    }
 
    public void testExceptionSuppression() throws Exception {

Modified: core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -99,7 +99,6 @@
       long startTime = System.currentTimeMillis();
       TaskRunner exec = new TaskRunner(NUM_THREADS);
       log.warn("Starting warmup");
-      // creates all the Fqns since this can be expensive and we don't really want to measure this (for now)
       for (final Object key : keys) {
          exec.execute(new Runnable() {
             public void run() {

Modified: core/branches/flat/src/test/java/org/horizon/replication/SyncCacheListenerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/replication/SyncCacheListenerTest.java	2009-01-30 16:48:58 UTC (rev 7616)
+++ core/branches/flat/src/test/java/org/horizon/replication/SyncCacheListenerTest.java	2009-01-30 17:06:45 UTC (rev 7617)
@@ -29,7 +29,6 @@
 import javax.transaction.TransactionManager;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * Test out the CacheListener
@@ -161,12 +160,9 @@
          cache1.put(key, val);
       }
 
-      public void put(String fqn, Map map) {
-         if (map.size() == 0)
-            fail("put(): map size can't be 0");
-         Set<String> set = map.keySet();
-         key = set.iterator().next();// take anyone
-         cache1.put(fqn, map);
+      public void put(Map map) {
+         if (map.size() == 0) fail("put(): map size can't be 0");
+         cache1.putAll(map);
       }
 
       @CacheEntryModified




More information about the jbosscache-commits mailing list