Author: manik.surtani(a)jboss.com
Date: 2008-06-17 19:59:38 -0400 (Tue, 17 Jun 2008)
New Revision: 6002
Modified:
core/trunk/src/main/java/org/jboss/cache/CacheSPI.java
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/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java
core/trunk/src/main/java/org/jboss/cache/factories/EmptyConstructorFactory.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
core/trunk/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java
core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java
core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
Log:
Fixed some ugliness around interfaces introduced for DataContainer and Notifier, as direct
implementations of these were being used instead of the interfaces
Modified: core/trunk/src/main/java/org/jboss/cache/CacheSPI.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/CacheSPI.java 2008-06-17 23:53:14 UTC (rev
6001)
+++ core/trunk/src/main/java/org/jboss/cache/CacheSPI.java 2008-06-17 23:59:38 UTC (rev
6002)
@@ -13,7 +13,7 @@
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.marshall.Marshaller;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.TransactionTable;
@@ -204,10 +204,10 @@
* From 2.1.0, Interceptor authors should obtain this by injection rather than this
method. See the
* {@link org.jboss.cache.factories.annotations.Inject} annotation.
*
- * @return the notifier attached with this instance of the cache. See {@link
org.jboss.cache.notifications.NotifierImpl}, a class
+ * @return the notifier attached with this instance of the cache. See {@link
org.jboss.cache.notifications.Notifier}, a class
* that is responsible for emitting notifications to registered
CacheListeners.
*/
- NotifierImpl getNotifier();
+ Notifier getNotifier();
/**
* @return the name of the cluster. Null if running in local mode.
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-06-17 23:53:14 UTC
(rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-06-17 23:59:38 UTC
(rev 6002)
@@ -158,6 +158,16 @@
int getNumberOfAttributes(Fqn fqn);
/**
+ * Returns an <em>approximation</em> of the total number of attributes in
+ * the cache. Since this method doesn't acquire any locks, the number might
+ * be incorrect, or the method might even throw a
+ * ConcurrentModificationException
+ *
+ * @return number of attribs
+ */
+ int getNumberOfAttributes();
+
+ /**
* Removes the actual node from the tree data structure.
*
* @param f the Fqn of the node to remove
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-06-17 23:53:14
UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-06-17 23:59:38
UTC (rev 6002)
@@ -14,7 +14,12 @@
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.transaction.GlobalTransaction;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* A container for the root node in the cache, which also provides helpers for
efficiently accessing nodes, walking trees, etc.
@@ -396,14 +401,6 @@
return count;
}
- /**
- * Returns an <em>approximation</em> of the total number of attributes in
- * the cache. Since this method doesn't acquire any locks, the number might
- * be incorrect, or the method might even throw a
- * ConcurrentModificationException
- *
- * @return number of attribs
- */
public int getNumberOfAttributes()
{
return numAttributes(root);
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-06-17 23:53:14 UTC
(rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-06-17 23:59:38 UTC
(rev 6002)
@@ -23,7 +23,7 @@
import org.jboss.cache.marshall.CommandAwareRpcDispatcher;
import org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher;
import org.jboss.cache.marshall.Marshaller;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.remoting.jgroups.ChannelMessageListener;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.transaction.GlobalTransaction;
@@ -82,7 +82,7 @@
*/
private ChannelMessageListener messageListener;
private Configuration configuration;
- private NotifierImpl notifier;
+ private Notifier notifier;
private CacheSPI spi;
private InvocationContextContainer invocationContextContainer;
private final boolean trace = log.isTraceEnabled();
@@ -97,10 +97,10 @@
private LockManager lockManager;
@Inject
- public void setupDependencies(ChannelMessageListener messageListener, Configuration
configuration, NotifierImpl notifier,
- CacheSPI spi, Marshaller marshaller, TransactionTable
txTable,
- TransactionManager txManager,
InvocationContextContainer container, InterceptorChain interceptorChain,
- ComponentRegistry componentRegistry, LockManager
lockManager)
+ public void setupDependencies(ChannelMessageListener messageListener, Configuration
configuration, Notifier notifier,
+ CacheSPI spi, Marshaller marshaller, TransactionTable
txTable,
+ TransactionManager txManager, InvocationContextContainer
container, InterceptorChain interceptorChain,
+ ComponentRegistry componentRegistry, LockManager
lockManager)
{
this.messageListener = messageListener;
this.configuration = configuration;
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -10,7 +10,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.RPCManager;
@@ -32,7 +32,7 @@
import org.jboss.cache.factories.annotations.Start;
import org.jboss.cache.factories.annotations.Stop;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.ViewChanged;
import org.jboss.cache.notifications.event.ViewChangedEvent;
@@ -79,7 +79,7 @@
private CacheSPI<?, ?> cache;
private Configuration configuration;
private RegionManager regionManager;
- private NotifierImpl notifier;
+ private Notifier notifier;
private StateTransferManager stateTransferManager;
private RPCManager rpcManager;
/**
@@ -142,7 +142,7 @@
private ViewChangeListener viewChangeListener; // the view-change viewChangeListener
private boolean receivedBuddyInfo;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private BuddyFqnTransformer buddyFqnTransformer;
public BuddyManager()
@@ -181,8 +181,8 @@
@Inject
public void injectDependencies(CacheSPI cache, Configuration configuration,
RegionManager regionManager,
- StateTransferManager stateTransferManager, RPCManager
rpcManager, NotifierImpl notifier,
- CommandsFactory factory, DataContainerImpl
dataContainer, BuddyFqnTransformer transformer)
+ StateTransferManager stateTransferManager, RPCManager
rpcManager, Notifier notifier,
+ CommandsFactory factory, DataContainer dataContainer,
BuddyFqnTransformer transformer)
{
this.cache = cache;
this.configuration = configuration;
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -2,7 +2,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
@@ -30,7 +30,7 @@
private DataCommand dataCommand;
private boolean searchBackupSubtrees;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private InterceptorChain interceptorChain;
private static final Log log = LogFactory.getLog(ClusteredGetCommand.class);
@@ -46,7 +46,7 @@
{
}
- public void initialize(DataContainerImpl dataContainer, InterceptorChain
interceptorChain)
+ public void initialize(DataContainer dataContainer, InterceptorChain
interceptorChain)
{
this.dataContainer = dataContainer;
this.interceptorChain = interceptorChain;
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -2,7 +2,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -38,7 +38,7 @@
private TransactionTable transactionTable;
private InterceptorChain invoker;
private CommandsFactory commandsFactory;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
/* parameters */
private GlobalTransaction globalTransaction;
@@ -58,7 +58,7 @@
}
public void initialize(BuddyManager buddyManager, InterceptorChain invoker,
TransactionTable transactionTable,
- CommandsFactory commandsFactory, DataContainerImpl
dataContainer, BuddyFqnTransformer buddyFqnTransformer)
+ CommandsFactory commandsFactory, DataContainer dataContainer,
BuddyFqnTransformer buddyFqnTransformer)
{
this.buddyManager = buddyManager;
this.invoker = invoker;
Modified: core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -2,12 +2,12 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.RPCManager;
+import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.buddyreplication.BuddyGroup;
import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.commands.ReversibleCommand;
@@ -18,7 +18,12 @@
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ClusteredGetCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -28,7 +33,7 @@
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.interceptors.InterceptorChain;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.TransactionTable;
import org.jgroups.Address;
@@ -54,8 +59,8 @@
public class CommandsFactory
{
private RPCManager rpcManager;
- private DataContainerImpl dataContainer;
- private NotifierImpl notifier;
+ private DataContainer dataContainer;
+ private Notifier notifier;
private InterceptorChain invoker;
private BuddyManager buddyManager;
private TransactionTable transactionTable;
@@ -69,7 +74,7 @@
}
@Inject
- public void initialize(RPCManager rpc, DataContainerImpl dataContainer, NotifierImpl
notifier, BuddyManager buddyManager,
+ public void initialize(RPCManager rpc, DataContainer dataContainer, Notifier notifier,
BuddyManager buddyManager,
InterceptorChain invoker, TransactionTable transactionTable,
CacheSPI cacheSpi,
Configuration configuration, TransactionManager txManager,
BuddyFqnTransformer buddyFqnTransformer)
{
@@ -178,7 +183,8 @@
command.initialize(txManager);
command.initialize(cacheSpi, dataContainer, notifier);
return command;
- } else
+ }
+ else
{
InvalidateCommand command = new InvalidateCommand(fqn);
command.initialize(cacheSpi, dataContainer, notifier);
@@ -450,7 +456,8 @@
returnValue.initialize(txManager);
returnValue.initialize(cacheSpi, dataContainer, notifier);
command = returnValue;
- } else
+ }
+ else
{
InvalidateCommand returnValue = new InvalidateCommand();
returnValue.initialize(cacheSpi, dataContainer, notifier);
Modified: core/trunk/src/main/java/org/jboss/cache/factories/EmptyConstructorFactory.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/factories/EmptyConstructorFactory.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/factories/EmptyConstructorFactory.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -1,6 +1,6 @@
package org.jboss.cache.factories;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.RegionManager;
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.config.ConfigurationException;
@@ -11,7 +11,7 @@
import org.jboss.cache.lock.LockStrategyFactory;
import org.jboss.cache.marshall.Marshaller;
import org.jboss.cache.marshall.VersionAwareMarshaller;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.remoting.jgroups.ChannelMessageListener;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.transaction.TransactionTable;
@@ -22,9 +22,9 @@
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
* @since 2.1.0
*/
-@DefaultFactoryFor(classes = {StateTransferManager.class, RegionManager.class,
NotifierImpl.class,
+@DefaultFactoryFor(classes = {StateTransferManager.class, RegionManager.class,
Notifier.class,
ChannelMessageListener.class, CacheLoaderManager.class, Marshaller.class,
InvocationContextContainer.class,
- CacheInvocationDelegate.class, TransactionTable.class, DataContainerImpl.class,
CommandsFactory.class,
+ CacheInvocationDelegate.class, TransactionTable.class, DataContainer.class,
CommandsFactory.class,
LockStrategyFactory.class, BuddyFqnTransformer.class})
public class EmptyConstructorFactory extends ComponentFactory
{
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -1,7 +1,7 @@
package org.jboss.cache.interceptors;
import org.jboss.cache.CacheException;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -29,7 +29,7 @@
import org.jboss.cache.lock.LockManager;
import org.jboss.cache.lock.LockType;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.transaction.TransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
@@ -55,8 +55,8 @@
protected TransactionTable txTable = null;
protected CacheLoader loader;
- protected DataContainerImpl dataContainer;
- protected NotifierImpl notifier;
+ protected DataContainer dataContainer;
+ protected Notifier notifier;
protected boolean isActivation = false;
protected boolean usingOptimisticInvalidation = false;
@@ -71,7 +71,7 @@
@Inject
protected void injectDependencies(TransactionTable txTable, CacheLoaderManager clm,
Configuration configuration,
- DataContainerImpl dataContainer, LockManager
lockManager, NotifierImpl notifier)
+ DataContainer dataContainer, LockManager
lockManager, Notifier notifier)
{
this.txTable = txTable;
this.clm = clm;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -21,7 +21,7 @@
*/
package org.jboss.cache.interceptors;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.write.EvictCommand;
@@ -52,10 +52,10 @@
private long m_start = System.currentTimeMillis();
private long m_reset = m_start;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
@Inject
- public void setDependencies(DataContainerImpl dataContainer)
+ public void setDependencies(DataContainer dataContainer)
{
this.dataContainer = dataContainer;
}
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -1,7 +1,7 @@
package org.jboss.cache.interceptors;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.Modification;
@@ -14,7 +14,12 @@
import org.jboss.cache.commands.tx.PrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.commands.write.ClearDataCommand;
-import org.jboss.cache.commands.write.*;
+import org.jboss.cache.commands.write.MoveCommand;
+import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
+import org.jboss.cache.commands.write.PutKeyValueCommand;
+import org.jboss.cache.commands.write.RemoveKeyCommand;
+import org.jboss.cache.commands.write.RemoveNodeCommand;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
@@ -49,7 +54,7 @@
private Map<GlobalTransaction, Set<Fqn>> preparingTxs = new
ConcurrentHashMap<GlobalTransaction, Set<Fqn>>();
private long cacheStores = 0;
private CacheLoader loader;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private CacheLoaderManager loaderManager;
public CacheStoreInterceptor()
@@ -59,7 +64,7 @@
}
@Inject
- protected void init(DataContainerImpl dataContainer, CacheLoaderManager loaderManager,
TransactionManager txManager, CacheLoaderConfig clConfig)
+ protected void init(DataContainer dataContainer, CacheLoaderManager loaderManager,
TransactionManager txManager, CacheLoaderConfig clConfig)
{
// never inject a CacheLoader at this stage - only a CacheLoaderManager, since the
CacheLoaderManager only creates a CacheLoader instance when it @Starts.
this.loaderManager = loaderManager;
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -6,13 +6,23 @@
*/
package org.jboss.cache.interceptors;
-import org.jboss.cache.*;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.DataContainer;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.cache.buddyreplication.GravitateResult;
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
-import org.jboss.cache.commands.read.*;
+import org.jboss.cache.commands.read.ExistsCommand;
+import org.jboss.cache.commands.read.GetChildrenNamesCommand;
+import org.jboss.cache.commands.read.GetDataMapCommand;
+import org.jboss.cache.commands.read.GetKeyValueCommand;
+import org.jboss.cache.commands.read.GetKeysCommand;
+import org.jboss.cache.commands.read.GetNodeCommand;
+import org.jboss.cache.commands.read.GravitateDataCommand;
import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
@@ -59,13 +69,13 @@
* cleanup commands corresponding to all gravitate calls made during the course of the
transaction in question.
*/
private Map<GlobalTransaction, List<ReplicableCommand>> cleanupCommands =
new ConcurrentHashMap<GlobalTransaction, List<ReplicableCommand>>();
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private CommandsFactory commandsFactory;
private CacheSPI cacheSPI;
private BuddyFqnTransformer buddyFqnTransformer;
@Inject
- public void injectComponents(BuddyManager buddyManager, DataContainerImpl
dataContainer, CommandsFactory commandsFactory, CacheSPI cacheSPI, BuddyFqnTransformer
transformer)
+ public void injectComponents(BuddyManager buddyManager, DataContainer dataContainer,
CommandsFactory commandsFactory, CacheSPI cacheSPI, BuddyFqnTransformer transformer)
{
this.buddyManager = buddyManager;
this.dataContainer = dataContainer;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -7,7 +7,7 @@
*/
package org.jboss.cache.interceptors;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -17,7 +17,12 @@
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.write.ClearDataCommand;
-import org.jboss.cache.commands.write.*;
+import org.jboss.cache.commands.write.EvictCommand;
+import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
+import org.jboss.cache.commands.write.PutKeyValueCommand;
+import org.jboss.cache.commands.write.RemoveKeyCommand;
+import org.jboss.cache.commands.write.RemoveNodeCommand;
import org.jboss.cache.eviction.EvictedEventNode;
import org.jboss.cache.eviction.NodeEventType;
import org.jboss.cache.factories.annotations.Inject;
@@ -36,10 +41,10 @@
{
protected RegionManager regionManager;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
@Inject
- public void initialize(DataContainerImpl dataContainer)
+ public void initialize(DataContainer dataContainer)
{
this.dataContainer = dataContainer;
}
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -5,7 +5,7 @@
import org.jboss.cache.commands.tx.PrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
/**
* The interceptor in charge of firing off notifications to cache listeners
@@ -15,10 +15,10 @@
*/
public class NotificationInterceptor extends BaseTransactionalContextInterceptor
{
- private NotifierImpl notifier;
+ private Notifier notifier;
@Inject
- public void injectDependencies(NotifierImpl notifier)
+ public void injectDependencies(Notifier notifier)
{
this.notifier = notifier;
}
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -8,7 +8,7 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeFactory;
@@ -46,14 +46,14 @@
*/
private NodeFactory nodeFactory;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private CacheSPI cache;
private long lockAcquisitionTimeout;
@Inject
- private void injectDependencies(NodeFactory nodeFactory, DataContainerImpl
dataContainer, CacheSPI cacheSPI)
+ private void injectDependencies(NodeFactory nodeFactory, DataContainer dataContainer,
CacheSPI cacheSPI)
{
this.nodeFactory = nodeFactory;
this.dataContainer = dataContainer;
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -8,7 +8,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeFactory;
@@ -20,17 +20,17 @@
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
+import org.jboss.cache.commands.write.ClearDataCommand;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
-import org.jboss.cache.commands.write.ClearDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
import org.jboss.cache.commands.write.RemoveNodeCommand;
import org.jboss.cache.config.Option;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import static org.jboss.cache.notifications.event.NodeModifiedEvent.ModificationType.*;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.optimistic.DefaultDataVersion;
@@ -56,12 +56,12 @@
* Needed for the creation of workspace nodes based on underlying nodes in the cache.
*/
private NodeFactory nodeFactory;
- private NotifierImpl notifier;
- private DataContainerImpl dataContainer;
+ private Notifier notifier;
+ private DataContainer dataContainer;
private long lockAcquisitionTimeout;
@Inject
- protected void injectDependencies(NotifierImpl notifier, NodeFactory nodeFactory,
DataContainerImpl dataContainer)
+ protected void injectDependencies(Notifier notifier, NodeFactory nodeFactory,
DataContainer dataContainer)
{
this.notifier = notifier;
this.nodeFactory = nodeFactory;
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -6,8 +6,11 @@
*/
package org.jboss.cache.interceptors;
-import org.jboss.cache.DataContainerImpl;
-import org.jboss.cache.*;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.DataContainer;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
@@ -47,10 +50,10 @@
{
private boolean useTombstones;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
@Inject
- public void initialize(DataContainerImpl dataContainer)
+ public void initialize(DataContainer dataContainer)
{
this.dataContainer = dataContainer;
}
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -1,6 +1,6 @@
package org.jboss.cache.interceptors;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -9,7 +9,7 @@
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import java.util.Collections;
import java.util.HashMap;
@@ -30,11 +30,11 @@
private final AtomicLong passivations = new AtomicLong(0);
protected CacheLoader loader;
- private NotifierImpl notifier;
- private DataContainerImpl dataContainer;
+ private Notifier notifier;
+ private DataContainer dataContainer;
@Inject
- public void setDependencies(NotifierImpl notifier, DataContainerImpl dataContainer,
CacheLoaderManager loaderManager)
+ public void setDependencies(Notifier notifier, DataContainer dataContainer,
CacheLoaderManager loaderManager)
{
this.notifier = notifier;
this.dataContainer = dataContainer;
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -6,7 +6,7 @@
*/
package org.jboss.cache.interceptors;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -62,12 +62,12 @@
*/
public class PessimisticLockInterceptor extends PostProcessingCommandInterceptor
{
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private PessimisticNodeBasedLockManager lockManager;
private CommandsFactory commandsFactory;
@Inject
- public void injectDependencies(DataContainerImpl dataContainer, LockManager
lockManager, CommandsFactory commandsFactory)
+ public void injectDependencies(DataContainer dataContainer, LockManager lockManager,
CommandsFactory commandsFactory)
{
this.dataContainer = dataContainer;
this.lockManager = (PessimisticNodeBasedLockManager) lockManager;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -31,7 +31,7 @@
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.invocation.InvocationContextContainer;
import org.jboss.cache.lock.LockManager;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.TransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
@@ -63,7 +63,7 @@
{
protected CommandsFactory commandsFactory;
protected RPCManager rpcManager;
- private NotifierImpl notifier;
+ private Notifier notifier;
private InvocationContextContainer invocationContextContainer;
private ComponentRegistry componentRegistry;
@@ -80,7 +80,7 @@
@Inject
public void intialize(RPCManager rpcManager,
- NotifierImpl notifier, InvocationContextContainer icc,
+ Notifier notifier, InvocationContextContainer icc,
CommandsFactory factory, ComponentRegistry componentRegistry,
LockManager lockManager)
{
this.commandsFactory = factory;
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -24,7 +24,7 @@
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.marshall.Marshaller;
-import org.jboss.cache.notifications.NotifierImpl;
+import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.TransactionTable;
@@ -52,21 +52,21 @@
// this stuff is needed since the SPI has methods to retrieve these.
private StateTransferManager stateTransferManager;
private CacheLoaderManager cacheLoaderManager;
- private NotifierImpl notifier;
+ private Notifier notifier;
private TransactionManager transactionManager;
private BuddyManager buddyManager;
private TransactionTable transactionTable;
private RPCManager rpcManager;
private RegionManager regionManager;
private Marshaller marshaller;
- private DataContainerImpl dataContainer;
+ private DataContainer dataContainer;
private CommandsFactory commandsFactory;
@Inject
- public void initialize(StateTransferManager stateTransferManager, CacheLoaderManager
cacheLoaderManager, NotifierImpl notifier,
+ public void initialize(StateTransferManager stateTransferManager, CacheLoaderManager
cacheLoaderManager, Notifier notifier,
TransactionManager transactionManager, BuddyManager
buddyManager, TransactionTable transactionTable,
RPCManager rpcManager, RegionManager regionManager, Marshaller
marshaller,
- CommandsFactory commandsFactory, DataContainerImpl
dataContainer)
+ CommandsFactory commandsFactory, DataContainer dataContainer)
{
this.stateTransferManager = stateTransferManager;
this.cacheLoaderManager = cacheLoaderManager;
@@ -215,7 +215,7 @@
return peek(fqn, false, false) != null;
}
- public NotifierImpl getNotifier()
+ public Notifier getNotifier()
{
return notifier;
}
@@ -560,7 +560,7 @@
return getChildrenNames(Fqn.fromString(fqn));
}
- public DataContainerImpl getDataContainer()
+ public DataContainer getDataContainer()
{
return dataContainer;
}
Modified: core/trunk/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -2,7 +2,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.DataContainer;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
@@ -26,11 +26,11 @@
protected Configuration configuration;
protected long lockAcquisitionTimeout;
- protected DataContainerImpl dataContainer;
+ protected DataContainer dataContainer;
protected NodeSPI rootNode;
@Inject
- public void inject(Configuration configuration, DataContainerImpl dataContainer)
+ public void inject(Configuration configuration, DataContainer dataContainer)
{
this.configuration = configuration;
this.dataContainer = dataContainer;
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -2,19 +2,17 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.cache.factories.annotations.Start;
-import org.jboss.cache.factories.annotations.Stop;
import org.jboss.cache.notifications.event.NodeModifiedEvent;
import org.jgroups.View;
import javax.transaction.Transaction;
import java.util.Map;
+import java.util.Set;
/**
* Public interface with all allowed notifications.
- *
+ *
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
@@ -33,7 +31,7 @@
/**
* When notifying about node modifications, in many scenarios there is a need of
building a new Map object. If no
* listeners are registered for notification then it is pointless building this object
- so guard the notification
- * with this call.
+ * with this call.
*/
public boolean shouldNotifyOnNodeModified();
@@ -105,4 +103,23 @@
void notifyCacheBlocked(boolean pre);
void notifyCacheUnblocked(boolean pre);
+
+ /**
+ * Adds a cache listener to the list of cache listeners registered.
+ *
+ * @param listener
+ */
+ void addCacheListener(Object listener);
+
+ /**
+ * Removes a cache listener from the list of cache listeners registered.
+ *
+ * @param listener
+ */
+ void removeCacheListener(Object listener);
+
+ /**
+ * @return Retrieves an (unmodifiable) set of cache listeners registered.
+ */
+ Set<Object> getCacheListeners();
}
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java 2008-06-17
23:53:14 UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -8,10 +8,18 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.*;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
import org.jboss.cache.buddyreplication.BuddyGroup;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.factories.annotations.*;
+import org.jboss.cache.factories.annotations.Destroy;
+import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.factories.annotations.NonVolatile;
+import org.jboss.cache.factories.annotations.Start;
+import org.jboss.cache.factories.annotations.Stop;
import org.jboss.cache.marshall.MarshalledValueMap;
import org.jboss.cache.notifications.annotation.*;
import org.jboss.cache.notifications.event.*;
@@ -23,7 +31,12 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
/**
@@ -153,21 +166,11 @@
result.add(li);
}
- /**
- * Adds a cache listener to the list of cache listeners registered.
- *
- * @param listener
- */
public void addCacheListener(Object listener)
{
validateAndAddListenerInvocation(listener);
}
- /**
- * Removes a cache listener from the list of cache listeners registered.
- *
- * @param listener
- */
public void removeCacheListener(Object listener)
{
for (Class annotation : allowedMethodAnnotations)
removeListenerInvocation(annotation, listener);
@@ -210,9 +213,6 @@
buddyGroupChangedListeners.clear();
}
- /**
- * @return Retrieves an (unmodifiable) set of cache listeners registered.
- */
public Set<Object> getCacheListeners()
{
Set<Object> result = new HashSet<Object>();
Modified: core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java 2008-06-17 23:53:14
UTC (rev 6001)
+++ core/trunk/src/main/java/org/jboss/cache/util/CachePrinter.java 2008-06-17 23:59:38
UTC (rev 6002)
@@ -23,7 +23,7 @@
public static String printCacheDetails(Cache c)
{
// internal cast
- DataContainerImpl ci = ((CacheInvocationDelegate) c).getDataContainer();
+ DataContainerImpl ci = (DataContainerImpl) ((CacheInvocationDelegate)
c).getDataContainer();
return ci.printDetails();
}
@@ -36,7 +36,7 @@
public static String printCacheLockingInfo(Cache c)
{
// internal cast
- DataContainerImpl cd = ((CacheInvocationDelegate) c).getDataContainer();
+ DataContainerImpl cd = (DataContainerImpl) ((CacheInvocationDelegate)
c).getDataContainer();
return cd.printLockInfo();
}
Modified:
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-06-17
23:53:14 UTC (rev 6001)
+++
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-06-17
23:59:38 UTC (rev 6002)
@@ -31,12 +31,12 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.event.Event;
import static org.jboss.cache.notifications.event.Event.Type.*;
import org.jboss.cache.notifications.event.EventImpl;
import org.jboss.cache.notifications.event.NodeModifiedEvent;
import static org.jboss.cache.notifications.event.NodeModifiedEvent.ModificationType.*;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -114,7 +114,7 @@
cr1 = TestingUtil.extractComponentRegistry(cache1);
cr2 = TestingUtil.extractComponentRegistry(cache2);
assert cr1 != cr2;
- assert cr1.getComponent(NotifierImpl.class) !=
cr2.getComponent(NotifierImpl.class);
+ assert cr1.getComponent(Notifier.class) != cr2.getComponent(Notifier.class);
assert eventLog1 != eventLog2;
assert cache1.getLocalAddress() != cache2.getLocalAddress();
CacheSPI spi1, spi2;