[infinispan-commits] Infinispan SVN: r1902 - in branches/4.1.x: cachestore/jdbc/src/test/java/org/infinispan/config/parsing and 65 other directories.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Fri Jun 11 04:32:44 EDT 2010
Author: mircea.markus
Date: 2010-06-11 04:32:26 -0400 (Fri, 11 Jun 2010)
New Revision: 1902
Added:
branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java
Removed:
branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java
branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheManager.java
Modified:
branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/config/parsing/JdbcConfigurationTest.java
branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableNameUniquenessTest.java
branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/binary/BinaryStoreWithManagedConnectionTest.java
branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/mixed/MixedStoreWithManagedConnectionTest.java
branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/stringbased/StringStoreWithManagedConnectionTest.java
branches/4.1.x/cachestore/remote/src/main/java/org/infinispan/loaders/remote/RemoteCacheStoreConfig.java
branches/4.1.x/cachestore/remote/src/test/java/org.infinispan.loaders.remote/RemoteCacheStoreConfigTest.java
branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/RemoteCacheSupport.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheContainerTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerNotStartedTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerStoppedTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodStatisticsTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ReplTopologyChangeTest.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerShutdownTest.java
branches/4.1.x/core/src/main/java/org/infinispan/AbstractDelegatingCache.java
branches/4.1.x/core/src/main/java/org/infinispan/Cache.java
branches/4.1.x/core/src/main/java/org/infinispan/config/Configuration.java
branches/4.1.x/core/src/main/java/org/infinispan/loaders/decorators/SingletonStore.java
branches/4.1.x/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java
branches/4.1.x/core/src/main/java/org/infinispan/manager/EmbeddedCacheManager.java
branches/4.1.x/core/src/main/java/org/infinispan/notifications/cachemanagerlistener/event/EventImpl.java
branches/4.1.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
branches/4.1.x/core/src/main/java/org/infinispan/transaction/xa/TransactionTable.java
branches/4.1.x/core/src/test/java/org/infinispan/affinity/BaseKeyAffinityServiceTest.java
branches/4.1.x/core/src/test/java/org/infinispan/affinity/KeyAffinityServiceTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/AsyncAPITest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/CacheAPITest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/CacheClusterJoinTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/ForceWriteLockTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/NoFlushFailureTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithTMTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithoutTMTest.java
branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/LockTestBase.java
branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/repeatable_read/WriteSkewTest.java
branches/4.1.x/core/src/test/java/org/infinispan/atomic/APITest.java
branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicHashMapConcurrencyTest.java
branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicMapFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/config/CustomInterceptorConfigTest.java
branches/4.1.x/core/src/test/java/org/infinispan/config/ProgrammaticConfigurationTest.java
branches/4.1.x/core/src/test/java/org/infinispan/config/SampleConfigFilesCorrectnessTest.java
branches/4.1.x/core/src/test/java/org/infinispan/config/parsing/Coherence2InfinispanTransformerTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistCacheStoreTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/ConcurrentStartWithReplTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/SingleOwnerTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/UnknownCacheStartTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentJoinTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentNonOverlappingLeaveTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentOverlappingLeaveTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/L1OnRehashTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashAfterPartitionMergeTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashCompletedOnJoinTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleJoinTest.java
branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleLeaveTest.java
branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesEvictionTest.java
branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesManualEvictionTest.java
branches/4.1.x/core/src/test/java/org/infinispan/expiry/ExpiryTest.java
branches/4.1.x/core/src/test/java/org/infinispan/interceptors/MarshalledValueInterceptorTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheManagerMBeanTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/ComponentsJmxRegistrationTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/JmxStatsFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/RpcManagerMBeanTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jmx/TxInterceptorMBeanTest.java
branches/4.1.x/core/src/test/java/org/infinispan/jndi/BindingTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/BaseCacheStoreFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/CacheLoaderFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/ClusterCacheLoaderTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/ConcurrentLoadAndEvictTxTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/PassivationFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/decorators/SingletonStoreTest.java
branches/4.1.x/core/src/test/java/org/infinispan/loaders/file/ClusterFileCacheStoreFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/manager/CacheManagerTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/AsyncNotificationTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerCacheLoaderTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerRemovalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/ConcurrentNotificationTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java
branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachemanagerlistener/CacheManagerNotifierTest.java
branches/4.1.x/core/src/test/java/org/infinispan/profiling/DeadlockDetectionPerformanceTest.java
branches/4.1.x/core/src/test/java/org/infinispan/remoting/jgroups/ChannelLookupTest.java
branches/4.1.x/core/src/test/java/org/infinispan/replication/ReplicationQueueTest.java
branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferCacheLoaderFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFetchOnlyPersistentStateTest.java
branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFileCacheLoaderFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFunctionalTest.java
branches/4.1.x/core/src/test/java/org/infinispan/stress/PutIfAbsentStressTest.java
branches/4.1.x/core/src/test/java/org/infinispan/test/AbstractCacheTest.java
branches/4.1.x/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java
branches/4.1.x/core/src/test/java/org/infinispan/test/ReplListener.java
branches/4.1.x/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
branches/4.1.x/core/src/test/java/org/infinispan/test/TestingUtil.java
branches/4.1.x/core/src/test/java/org/infinispan/test/ViewChangeListener.java
branches/4.1.x/core/src/test/java/org/infinispan/test/fwk/DebuggingUnitTestNGListener.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/LargeTransactionTest.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/MarkAsRollbackTest.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/OnePhaseXATest.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/StaleLockRecoveryTest.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningCaches.java
branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningReplicatedCaches.java
branches/4.1.x/demos/directory/src/main/java/org/infinispan/demos/directory/FilesystemDirectory.java
branches/4.1.x/demos/ec2/src/main/java/org/infinispan/ec2demo/CacheBuilder.java
branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/CacheManagerHolder.java
branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/GridStore.java
branches/4.1.x/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java
branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DemoActions.java
branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DirectoryFactory.java
branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/CacheTestSupport.java
branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/InfinispanDirectoryStressTest.java
branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/profiling/PerformanceCompareStressTest.java
branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/testutils/ClusteredCacheFactory.java
branches/4.1.x/pom.xml
branches/4.1.x/query/src/test/java/org/infinispan/query/backend/QueryHelperTest.java
branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/KeyTypeTest.java
branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/LocalCacheTest.java
branches/4.1.x/query/src/test/java/org/infinispan/query/config/QueryParsingTest.java
branches/4.1.x/server/core/src/main/scala/org/infinispan/server/core/Main.scala
branches/4.1.x/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodIdleTimeoutTest.scala
branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedDecoder.scala
branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedServer.scala
branches/4.1.x/server/memcached/src/test/scala/org/infinispan/server/memcached/MemcachedFunctionalTest.scala
branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServer.java
branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServerHandler.java
branches/4.1.x/server/websocket/src/test/java/org/infinispan/server/websocket/handlers/MockClient.java
branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/NodeAPITest.java
branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/TreeCacheAPITest.java
branches/4.1.x/tree/src/test/java/org/infinispan/profiling/TreeProfileTest.java
Log:
updated test
Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/config/parsing/JdbcConfigurationTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/config/parsing/JdbcConfigurationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/config/parsing/JdbcConfigurationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -31,7 +31,7 @@
import org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory;
import org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore;
import org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStoreConfig;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
@@ -88,7 +88,7 @@
@Test(expectedExceptions={org.infinispan.CacheException.class})
public void testWrongStoreConfiguration() throws IOException {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = new DefaultCacheManager("configs/illegal.xml");
cm.start();
Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableNameUniquenessTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableNameUniquenessTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableNameUniquenessTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -30,7 +30,7 @@
import org.infinispan.loaders.jdbc.mixed.JdbcMixedCacheStore;
import org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore;
import org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStoreConfig;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -48,7 +48,7 @@
public class TableNameUniquenessTest extends AbstractInfinispanTest {
public void testForJdbcStringBasedCacheStore() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/string-based.xml");
Cache<String, String> first = cm.getCache("first");
@@ -73,7 +73,7 @@
}
public void testForJdbcBinaryCacheStore() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/binary.xml");
Cache<String, String> first = cm.getCache("first");
@@ -93,7 +93,7 @@
@SuppressWarnings("unchecked")
public void testForMixedCacheStore() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/mixed.xml");
Cache first = cm.getCache("first");
Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/binary/BinaryStoreWithManagedConnectionTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/binary/BinaryStoreWithManagedConnectionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/binary/BinaryStoreWithManagedConnectionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -30,7 +30,7 @@
import org.infinispan.loaders.jdbc.TableManipulation;
import org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactoryConfig;
import org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.test.fwk.UnitTestDatabaseManager;
@@ -56,7 +56,7 @@
public void testLoadFromFile() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/managed/binary-managed-connection-factory.xml");
Cache<String, String> first = cm.getCache("first");
Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/mixed/MixedStoreWithManagedConnectionTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/mixed/MixedStoreWithManagedConnectionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/mixed/MixedStoreWithManagedConnectionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -30,7 +30,7 @@
import org.infinispan.loaders.jdbc.TableManipulation;
import org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactoryConfig;
import org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.test.fwk.UnitTestDatabaseManager;
@@ -60,7 +60,7 @@
public void testLoadFromFile() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/managed/mixed-managed-connection-factory.xml");
Cache<String, String> first = cm.getCache("first");
Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/stringbased/StringStoreWithManagedConnectionTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/stringbased/StringStoreWithManagedConnectionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/stringbased/StringStoreWithManagedConnectionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -30,7 +30,7 @@
import org.infinispan.loaders.jdbc.TableManipulation;
import org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactoryConfig;
import org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.test.fwk.UnitTestDatabaseManager;
@@ -55,7 +55,7 @@
}
public void testLoadFromFile() throws Exception {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
cm = TestCacheManagerFactory.fromXml("configs/managed/str-managed-connection-factory.xml");
Cache<String, String> first = cm.getCache("first");
Modified: branches/4.1.x/cachestore/remote/src/main/java/org/infinispan/loaders/remote/RemoteCacheStoreConfig.java
===================================================================
--- branches/4.1.x/cachestore/remote/src/main/java/org/infinispan/loaders/remote/RemoteCacheStoreConfig.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/remote/src/main/java/org/infinispan/loaders/remote/RemoteCacheStoreConfig.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -17,7 +17,7 @@
* <li>HotRodClientPropertiesFile-the file that contains the configuration of hotrod client. See <a href="http://community.jboss.org/wiki/JavaHotRodclient">Hotrod Java Client</a>
* for more details on the hotrod client.
* <li>remoteCacheName-the name of the remote cache in the remote infinispan cluster, to which to connect to</li>
- * <li>UseDefaultRemoteCache-if set to true, the default remote cache will be used, as obtained by {@link org.infinispan.manager.CacheManager#getCache()}.
+ * <li>UseDefaultRemoteCache-if set to true, the default remote cache will be used, as obtained by {@link org.infinispan.manager.CacheContainer#getCache()}.
* </ul>
*
* @author Mircea.Markus at jboss.com
Modified: branches/4.1.x/cachestore/remote/src/test/java/org.infinispan.loaders.remote/RemoteCacheStoreConfigTest.java
===================================================================
--- branches/4.1.x/cachestore/remote/src/test/java/org.infinispan.loaders.remote/RemoteCacheStoreConfigTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/cachestore/remote/src/test/java/org.infinispan.loaders.remote/RemoteCacheStoreConfigTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.loaders.CacheLoader;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
@@ -38,7 +38,7 @@
}
public void simpleTest() throws IOException {
- CacheManager cm = new DefaultCacheManager(CACHE_LOADER_CONFIG);
+ CacheContainer cm = new DefaultCacheManager(CACHE_LOADER_CONFIG);
Cache<Object, Object> cache = cm.getCache();
CacheLoader cacheLoader = TestingUtil.getCacheLoader(cache);
assert cacheLoader != null;
Modified: branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.client.hotrod;
import org.infinispan.client.hotrod.exceptions.HotRodClientException;
-import org.infinispan.client.hotrod.HotRodMarshaller;
import org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory;
import org.infinispan.client.hotrod.impl.protocol.HotRodOperations;
import org.infinispan.client.hotrod.impl.protocol.HotRodOperationsImpl;
@@ -11,8 +10,7 @@
import org.infinispan.client.hotrod.impl.transport.VHelper;
import org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory;
import org.infinispan.executors.ExecutorFactory;
-import org.infinispan.manager.CacheManager;
-import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -126,7 +124,7 @@
* @author Mircea.Markus at jboss.com
* @since 4.1
*/
-public class RemoteCacheManager implements CacheManager {
+public class RemoteCacheManager implements CacheContainer {
private static Log log = LogFactory.getLog(RemoteCacheManager.class);
Modified: branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/RemoteCacheSupport.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/RemoteCacheSupport.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/RemoteCacheSupport.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.config.Configuration;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.util.concurrent.NotifyingFuture;
import java.util.Collection;
@@ -37,7 +37,7 @@
}
@Override
- public CacheManager getCacheManager() {
+ public CacheContainer getCacheManager() {
throw new UnsupportedOperationException("Use getRemoteCacheManager() instead.");
}
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.client.hotrod;
import org.infinispan.Cache;
-import org.infinispan.client.hotrod.impl.transport.Transport;
import org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport;
import org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory;
import org.infinispan.config.Configuration;
@@ -10,7 +9,7 @@
import org.infinispan.interceptors.CacheMgmtInterceptor;
import org.infinispan.interceptors.base.CommandInterceptor;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.MultipleCacheManagersTest;
@@ -49,7 +48,7 @@
private RemoteCache<Object, Object> remoteCache;
private TcpTransportFactory tcpConnectionFactory;
private static final String CACHE_NAME = "distributedCache";
- Map<InetSocketAddress, CacheManager> hrServ2CacheManager = new HashMap<InetSocketAddress, CacheManager>();
+ Map<InetSocketAddress, CacheContainer> hrServ2CacheManager = new HashMap<InetSocketAddress, CacheContainer>();
private static Log log = LogFactory.getLog(CSAIntegrationTest.class);
@@ -122,7 +121,7 @@
@Test(dependsOnMethods = "testCorrectSetup")
public void testHashFunctionReturnsSameValues() {
- Map<InetSocketAddress, CacheManager> add2Cm = new HashMap<InetSocketAddress, CacheManager>();
+ Map<InetSocketAddress, CacheContainer> add2Cm = new HashMap<InetSocketAddress, CacheContainer>();
add2Cm.put(new InetSocketAddress(hotRodServer1.getHost(), hotRodServer1.getPort()), manager(0));
add2Cm.put(new InetSocketAddress(hotRodServer2.getHost(), hotRodServer2.getPort()), manager(1));
add2Cm.put(new InetSocketAddress(hotRodServer3.getHost(), hotRodServer3.getPort()), manager(2));
@@ -131,9 +130,9 @@
byte[] key = generateKey(i);
TcpTransport transport = (TcpTransport) tcpConnectionFactory.getTransport(key);
InetSocketAddress serverAddress = transport.getServerAddress();
- CacheManager cacheManager = add2Cm.get(serverAddress);
- assertNotNull("For server address " + serverAddress + " found " + cacheManager + ". Map is: " + add2Cm, cacheManager);
- DistributionManager distributionManager = cacheManager.getCache(CACHE_NAME).getAdvancedCache().getDistributionManager();
+ CacheContainer cacheContainer = add2Cm.get(serverAddress);
+ assertNotNull("For server address " + serverAddress + " found " + cacheContainer + ". Map is: " + add2Cm, cacheContainer);
+ DistributionManager distributionManager = cacheContainer.getCache(CACHE_NAME).getAdvancedCache().getDistributionManager();
assert distributionManager.isLocal(key);
tcpConnectionFactory.releaseTransport(transport);
}
@@ -179,11 +178,11 @@
}
private void assertOnlyServerHit(InetSocketAddress serverAddress) {
- CacheManager cacheManager = hrServ2CacheManager.get(serverAddress);
- CacheMgmtInterceptor interceptor = getCacheMgmtInterceptor(cacheManager.getCache(CACHE_NAME));
+ CacheContainer cacheContainer = hrServ2CacheManager.get(serverAddress);
+ CacheMgmtInterceptor interceptor = getCacheMgmtInterceptor(cacheContainer.getCache(CACHE_NAME));
assert interceptor.getHits() == 1;
- for (CacheManager cm : hrServ2CacheManager.values()) {
- if (cm != cacheManager) {
+ for (CacheContainer cm : hrServ2CacheManager.values()) {
+ if (cm != cacheContainer) {
interceptor = getCacheMgmtInterceptor(cm.getCache(CACHE_NAME));
assert interceptor.getHits() == 0;
}
@@ -198,8 +197,8 @@
}
private void assertCacheContainsKey(InetSocketAddress serverAddress, byte[] keyBytes) {
- CacheManager cacheManager = hrServ2CacheManager.get(serverAddress);
- Cache<Object, Object> cache = cacheManager.getCache(CACHE_NAME);
+ CacheContainer cacheContainer = hrServ2CacheManager.get(serverAddress);
+ Cache<Object, Object> cache = cacheContainer.getCache(CACHE_NAME);
DataContainer dataContainer = cache.getAdvancedCache().getDataContainer();
assert dataContainer.keySet().contains(new ByteArrayKey(keyBytes));
}
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheContainerTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheContainerTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheContainerTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.SingleCacheManagerTest;
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerNotStartedTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerNotStartedTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerNotStartedTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.client.hotrod.exceptions.RemoteCacheManagerNotStartedException;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.SingleCacheManagerTest;
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerStoppedTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerStoppedTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CacheManagerStoppedTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.client.hotrod.exceptions.RemoteCacheManagerNotStartedException;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.SingleCacheManagerTest;
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodStatisticsTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodStatisticsTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodStatisticsTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.client.hotrod;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.TestingUtil;
@@ -22,16 +22,16 @@
public class HotRodStatisticsTest {
private HotRodServer hotrodServer;
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
private RemoteCacheManager rcm;
private RemoteCache remoteCache;
long startTime;
@BeforeMethod
protected void setup() throws Exception {
- cacheManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(getClass().getSimpleName());
+ cacheContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(getClass().getSimpleName());
- hotrodServer = TestHelper.startHotRodServer((EmbeddedCacheManager) cacheManager);
+ hotrodServer = TestHelper.startHotRodServer((EmbeddedCacheManager) cacheContainer);
startTime = System.currentTimeMillis();
rcm = new RemoteCacheManager("localhost", hotrodServer.getPort());
remoteCache = rcm.getCache();
@@ -39,7 +39,7 @@
@AfterMethod
void tearDown() {
- TestingUtil.killCacheManagers(cacheManager);
+ TestingUtil.killCacheManagers(cacheContainer);
rcm.stop();
hotrodServer.stop();
}
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,5 @@
package org.infinispan.client.hotrod;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.SingleCacheManagerTest;
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ReplTopologyChangeTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ReplTopologyChangeTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ReplTopologyChangeTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,11 +1,9 @@
package org.infinispan.client.hotrod;
-import org.infinispan.Cache;
import org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory;
import org.infinispan.config.Configuration;
-import org.infinispan.distribution.BaseDistFunctionalTest;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
@@ -45,8 +43,8 @@
@Override
protected void createCacheManagers() throws Throwable {
config = getDefaultClusteredConfig(getCacheMode());
- CacheManager cm1 = TestCacheManagerFactory.createClusteredCacheManager(config);
- CacheManager cm2 = TestCacheManagerFactory.createClusteredCacheManager(config);
+ CacheContainer cm1 = TestCacheManagerFactory.createClusteredCacheManager(config);
+ CacheContainer cm2 = TestCacheManagerFactory.createClusteredCacheManager(config);
registerCacheManager(cm1);
registerCacheManager(cm2);
@@ -86,7 +84,7 @@
@Test(dependsOnMethods = "testTwoMembers")
public void testAddNewServer() {
- CacheManager cm3 = TestCacheManagerFactory.createClusteredCacheManager(config);
+ CacheContainer cm3 = TestCacheManagerFactory.createClusteredCacheManager(config);
registerCacheManager(cm3);
hotRodServer3 = TestHelper.startHotRodServer(manager(2));
manager(2).getCache();
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerShutdownTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerShutdownTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerShutdownTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,5 @@
package org.infinispan.client.hotrod;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/main/java/org/infinispan/AbstractDelegatingCache.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/AbstractDelegatingCache.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/AbstractDelegatingCache.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.util.concurrent.NotifyingFuture;
import java.util.Collection;
@@ -55,7 +55,7 @@
return cache.getVersion();
}
- public CacheManager getCacheManager() {
+ public CacheContainer getCacheManager() {
return cache.getCacheManager();
}
Modified: branches/4.1.x/core/src/main/java/org/infinispan/Cache.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/Cache.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/Cache.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -25,7 +25,7 @@
import org.infinispan.lifecycle.ComponentStatus;
import org.infinispan.lifecycle.Lifecycle;
import org.infinispan.loaders.CacheStore;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.notifications.Listenable;
import org.infinispan.util.concurrent.NotifyingFuture;
@@ -82,12 +82,12 @@
* Also, the use of async operations when within a transaction return your local value only, as expected. A
* NotifyingFuture is still returned though for API consistency.
* <p/>
- * <h3>Constructing a Cache</h3> An instance of the Cache is usually obtained by using a {@link CacheManager}.
+ * <h3>Constructing a Cache</h3> An instance of the Cache is usually obtained by using a {@link org.infinispan.manager.CacheContainer}.
* <pre>
* CacheManager cm = new DefaultCacheManager(); // optionally pass in a default configuration
* Cache c = cm.getCache();
* </pre>
- * See the {@link CacheManager} interface for more details on providing specific configurations, using multiple caches
+ * See the {@link org.infinispan.manager.CacheContainer} interface for more details on providing specific configurations, using multiple caches
* in the same JVM, etc.
* <p/>
* Please see the <a href="http://www.jboss.org/infinispan/docs">Infinispan documentation</a> and/or the <a
@@ -97,7 +97,7 @@
* @author Mircea.Markus at jboss.com
* @author Manik Surtani
* @author Galder Zamarreño
- * @see CacheManager
+ * @see org.infinispan.manager.CacheContainer
* @see DefaultCacheManager
* @see <a href="http://www.jboss.org/infinispan/docs">Infinispan documentation</a>
* @see <a href="http://www.jboss.org/community/wiki/5minutetutorialonInfinispan">5 Minute Usage Tutorial</a>
@@ -183,7 +183,7 @@
*
* @return a cache manager
*/
- CacheManager getCacheManager();
+ CacheContainer getCacheManager();
/**
* An overloaded form of {@link #put(Object, Object)}, which takes in lifespan parameters.
Modified: branches/4.1.x/core/src/main/java/org/infinispan/config/Configuration.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/config/Configuration.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/config/Configuration.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -166,7 +166,7 @@
/**
*
- * will be removed, please use {@link org.infinispan.manager.CacheManager#getGlobalConfiguration()}
+ * will be removed, please use {@link org.infinispan.manager.CacheContainer#getGlobalConfiguration()}
*/
@Deprecated
public GlobalConfiguration getGlobalConfiguration() {
Modified: branches/4.1.x/core/src/main/java/org/infinispan/loaders/decorators/SingletonStore.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/loaders/decorators/SingletonStore.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/loaders/decorators/SingletonStore.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -6,7 +6,6 @@
import org.infinispan.loaders.CacheLoaderException;
import org.infinispan.loaders.CacheStore;
import org.infinispan.loaders.modifications.Modification;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachemanagerlistener.annotation.CacheStarted;
Deleted: branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,43 +0,0 @@
-package org.infinispan.manager;
-
-import org.infinispan.Cache;
-
-/**
- * Acts as an container of {@link org.infinispan.Cache}s. Each cache in the container is identified by a name.
- * It also contains a <b>default</b> cache.
- *
- * @author Mircea.Markus at jboss.com
- * @since 4.1
- */
-public interface CacheContainer {
- /**
- * Retrieves the default cache associated with this cache container.
- * <p/>
- * As such, this method is always guaranteed to return the default cache.
- * <p />
- * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
- * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
- * that others may be using the cache.
- *
- * @return the default cache.
- */
- <K, V> Cache<K, V> getCache();
-
- /**
- * Retrieves a named cache from the system. If the cache has been previously created with the same name, the running
- * cache instance is returned. Otherwise, this method attempts to create the cache first.
- * <p/>
- * In the case of a {@link CacheManager}: when creating a new cache, this method will use the configuration passed in to the CacheManager on construction,
- * as a template, and then optionally apply any overrides previously defined for the named cache using the {@link
- * CacheManager#defineConfiguration(String, org.infinispan.config.Configuration)} or {@link CacheManager#defineConfiguration(String, String, org.infinispan.config.Configuration)}
- * methods, or declared in the configuration file.
- * <p />
- * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
- * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
- * that others may be using the cache.
- *
- * @param cacheName name of cache to retrieve
- * @return a cache instance identified by cacheName
- */
- <K, V> Cache<K, V> getCache(String cacheName);
-}
Added: branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java (rev 0)
+++ branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheContainer.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -0,0 +1,89 @@
+package org.infinispan.manager;
+
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration;
+import org.infinispan.config.GlobalConfiguration;
+import org.infinispan.factories.annotations.SurvivesRestarts;
+import org.infinispan.factories.scopes.Scope;
+import org.infinispan.factories.scopes.Scopes;
+import org.infinispan.lifecycle.ComponentStatus;
+import org.infinispan.lifecycle.Lifecycle;
+import org.infinispan.notifications.Listenable;
+import org.infinispan.remoting.transport.Address;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A <tt>CacheContainer</tt> is the primary mechanism for retrieving a {@link org.infinispan.Cache} instance, and is often
+ * used as a starting point to using the {@link org.infinispan.Cache}.
+ * <p/>
+ * <tt>CacheManager</tt>s are heavyweight objects, and we foresee no more than one <tt>CacheManager</tt> being used per
+ * JVM (unless specific configuration requirements require more than one; but either way, this would be a minimal and
+ * finite number of instances).
+ * <p/>
+ * You obtain <tt>Cache</tt> instances from the <tt>CacheManager</tt> by using one of the overloaded
+ * <tt>getCache()</tt>, methods. Note that with <tt>getCache()</tt>, there is no guarantee that the instance you get is
+ * brand-new and empty, since caches are named and shared. Because of this, the <tt>CacheManager</tt> also acts as a
+ * repository of <tt>Cache</tt>s, and is an effective mechanism of looking up or creating <tt>Cache</tt>s on demand.
+ * <p/>
+ * When the system shuts down, it should call {@link #stop()} on the <tt>CacheManager</tt>. This will ensure all caches
+ * within its scope are properly stopped as well.
+ * <p/>
+ * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
+ * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
+ * that others may be using the cache.
+ * <p />
+ * Sample usage:
+ * <code>
+ * CacheManager manager = new DefaultCacheManager("my-config-file.xml");
+ * Cache entityCache = manager.getCache("myEntityCache");
+ * entityCache.put("aPerson", new Person());
+ * <p/>
+ * Configuration myNewConfiguration = new Configuration();
+ * myNewConfiguration.setCacheMode(Configuration.CacheMode.LOCAL);
+ * manager.defineConfiguration("myLocalCache", myNewConfiguration);
+ * Cache localCache = manager.getCache("myLocalCache");
+ * </code>
+ *
+ * @see org.infinispan.manager.EmbeddedCacheManager
+ *
+ * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
+ * @author Galder Zamarreño
+ * @author Mircea.Markus at jboss.com
+ * @since 4.0
+ */
+public interface CacheContainer extends Lifecycle {
+
+ /**
+ * Retrieves the default cache associated with this cache container.
+ * <p/>
+ * As such, this method is always guaranteed to return the default cache.
+ * <p />
+ * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
+ * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
+ * that others may be using the cache.
+ *
+ * @return the default cache.
+ */
+ <K, V> Cache<K, V> getCache();
+
+ /**
+ * Retrieves a named cache from the system. If the cache has been previously created with the same name, the running
+ * cache instance is returned. Otherwise, this method attempts to create the cache first.
+ * <p/>
+ * In the case of a {@link org.infinispan.manager.EmbeddedCacheManager}: when creating a new cache, this method will
+ * use the configuration passed in to the EmbeddedCacheManager on construction, as a template, and then optionally
+ * apply any overrides previously defined for the named cache using the {@link EmbeddedCacheManager#defineConfiguration(String, org.infinispan.config.Configuration)}
+ * or {@link EmbeddedCacheManager#defineConfiguration(String, String, org.infinispan.config.Configuration)}
+ * methods, or declared in the configuration file.
+ * <p />
+ * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
+ * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
+ * that others may be using the cache.
+ *
+ * @param cacheName name of cache to retrieve
+ * @return a cache instance identified by cacheName
+ */
+ <K, V> Cache<K, V> getCache(String cacheName);
+}
Deleted: branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheManager.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheManager.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/manager/CacheManager.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,89 +0,0 @@
-package org.infinispan.manager;
-
-import org.infinispan.Cache;
-import org.infinispan.config.Configuration;
-import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.factories.annotations.SurvivesRestarts;
-import org.infinispan.factories.scopes.Scope;
-import org.infinispan.factories.scopes.Scopes;
-import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.lifecycle.Lifecycle;
-import org.infinispan.notifications.Listenable;
-import org.infinispan.remoting.transport.Address;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * A <tt>CacheManager</tt> is the primary mechanism for retrieving a {@link org.infinispan.Cache} instance, and is often
- * used as a starting point to using the {@link org.infinispan.Cache}.
- * <p/>
- * <tt>CacheManager</tt>s are heavyweight objects, and we foresee no more than one <tt>CacheManager</tt> being used per
- * JVM (unless specific configuration requirements require more than one; but either way, this would be a minimal and
- * finite number of instances).
- * <p/>
- * You obtain <tt>Cache</tt> instances from the <tt>CacheManager</tt> by using one of the overloaded
- * <tt>getCache()</tt>, methods. Note that with <tt>getCache()</tt>, there is no guarantee that the instance you get is
- * brand-new and empty, since caches are named and shared. Because of this, the <tt>CacheManager</tt> also acts as a
- * repository of <tt>Cache</tt>s, and is an effective mechanism of looking up or creating <tt>Cache</tt>s on demand.
- * <p/>
- * When the system shuts down, it should call {@link #stop()} on the <tt>CacheManager</tt>. This will ensure all caches
- * within its scope are properly stopped as well.
- * <p/>
- * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
- * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
- * that others may be using the cache.
- * <p />
- * Sample usage:
- * <code>
- * CacheManager manager = new DefaultCacheManager("my-config-file.xml");
- * Cache entityCache = manager.getCache("myEntityCache");
- * entityCache.put("aPerson", new Person());
- * <p/>
- * Configuration myNewConfiguration = new Configuration();
- * myNewConfiguration.setCacheMode(Configuration.CacheMode.LOCAL);
- * manager.defineConfiguration("myLocalCache", myNewConfiguration);
- * Cache localCache = manager.getCache("myLocalCache");
- * </code>
- *
- * @see org.infinispan.manager.EmbeddedCacheManager
- *
- * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @author Galder Zamarreño
- * @author Mircea.Markus at jboss.com
- * @since 4.0
- */
-public interface CacheManager extends Lifecycle {
-
- /**
- * Retrieves the default cache associated with this cache container.
- * <p/>
- * As such, this method is always guaranteed to return the default cache.
- * <p />
- * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
- * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
- * that others may be using the cache.
- *
- * @return the default cache.
- */
- <K, V> Cache<K, V> getCache();
-
- /**
- * Retrieves a named cache from the system. If the cache has been previously created with the same name, the running
- * cache instance is returned. Otherwise, this method attempts to create the cache first.
- * <p/>
- * In the case of a {@link org.infinispan.manager.EmbeddedCacheManager}: when creating a new cache, this method will
- * use the configuration passed in to the EmbeddedCacheManager on construction, as a template, and then optionally
- * apply any overrides previously defined for the named cache using the {@link EmbeddedCacheManager#defineConfiguration(String, org.infinispan.config.Configuration)}
- * or {@link EmbeddedCacheManager#defineConfiguration(String, String, org.infinispan.config.Configuration)}
- * methods, or declared in the configuration file.
- * <p />
- * <b>NB:</b> Shared caches are supported (and in fact encouraged) but if they are used it's the users responsibility to
- * ensure that <i>at least one</i> but <i>only one</i> caller calls stop() on the cache, and it does so with the awareness
- * that others may be using the cache.
- *
- * @param cacheName name of cache to retrieve
- * @return a cache instance identified by cacheName
- */
- <K, V> Cache<K, V> getCache(String cacheName);
-}
Modified: branches/4.1.x/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -105,7 +105,7 @@
@Scope(Scopes.GLOBAL)
@SurvivesRestarts
@MBean(objectName = DefaultCacheManager.OBJECT_NAME, description = "Component that acts as a manager, factory and container for caches in the system.")
-public class DefaultCacheManager implements EmbeddedCacheManager {
+public class DefaultCacheManager implements EmbeddedCacheManager, CacheManager {
public static final String DEFAULT_CACHE_NAME = "___defaultcache";
public static final String OBJECT_NAME = "CacheManager";
private static final Log log = LogFactory.getLog(DefaultCacheManager.class);
Modified: branches/4.1.x/core/src/main/java/org/infinispan/manager/EmbeddedCacheManager.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/manager/EmbeddedCacheManager.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/manager/EmbeddedCacheManager.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -36,7 +36,7 @@
*/
@Scope(Scopes.GLOBAL)
@SurvivesRestarts
-public interface EmbeddedCacheManager extends CacheManager, Listenable {
+public interface EmbeddedCacheManager extends CacheContainer, Listenable {
/**
* Defines a named cache's configuration using the following algorithm:
Modified: branches/4.1.x/core/src/main/java/org/infinispan/notifications/cachemanagerlistener/event/EventImpl.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/notifications/cachemanagerlistener/event/EventImpl.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/notifications/cachemanagerlistener/event/EventImpl.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,5 @@
package org.infinispan.notifications.cachemanagerlistener.event;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.Address;
Modified: branches/4.1.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -8,7 +8,6 @@
import org.infinispan.factories.annotations.Inject;
import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.NamedCacheNotFoundException;
import org.infinispan.marshall.Marshaller;
import org.infinispan.remoting.responses.ExceptionResponse;
Modified: branches/4.1.x/core/src/main/java/org/infinispan/transaction/xa/TransactionTable.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/transaction/xa/TransactionTable.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/main/java/org/infinispan/transaction/xa/TransactionTable.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -11,7 +11,6 @@
import org.infinispan.factories.annotations.Start;
import org.infinispan.factories.annotations.Stop;
import org.infinispan.interceptors.InterceptorChain;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.CacheNotifier;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/affinity/BaseKeyAffinityServiceTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/affinity/BaseKeyAffinityServiceTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/affinity/BaseKeyAffinityServiceTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.distribution.BaseDistFunctionalTest;
import org.infinispan.distribution.ConsistentHash;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.Address;
import org.infinispan.test.TestingUtil;
@@ -32,7 +32,7 @@
return topology(caches.get(1).getCacheManager());
}
- protected List<Address> topology(CacheManager cm) {
+ protected List<Address> topology(CacheContainer cm) {
return cm.getCache(cacheName).getAdvancedCache().getRpcManager().getTransport().getMembers();
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/affinity/KeyAffinityServiceTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/affinity/KeyAffinityServiceTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/affinity/KeyAffinityServiceTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,22 +1,14 @@
package org.infinispan.affinity;
import org.infinispan.Cache;
-import org.infinispan.distribution.BaseDistFunctionalTest;
import org.infinispan.distribution.ConsistentHash;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.Address;
-import org.infinispan.test.TestingUtil;
-import org.infinispan.util.logging.Log;
-import org.infinispan.util.logging.LogFactory;
import org.testng.annotations.Test;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Random;
-import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/AsyncAPITest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/AsyncAPITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/AsyncAPITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,6 @@
import java.util.concurrent.Future;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/CacheAPITest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/CacheAPITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/CacheAPITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.ConfigurationException;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/CacheClusterJoinTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/CacheClusterJoinTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/CacheClusterJoinTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.Configuration.CacheMode;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/ForceWriteLockTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/ForceWriteLockTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/ForceWriteLockTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,6 @@
import org.infinispan.container.entries.ReadCommittedEntry;
import org.infinispan.context.Flag;
import org.infinispan.context.InvocationContext;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/NoFlushFailureTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/NoFlushFailureTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/NoFlushFailureTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,7 @@
package org.infinispan.api;
import org.infinispan.config.ConfigurationException;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.Test;
@@ -13,7 +13,7 @@
@Test(groups = "functional", testName = "api.NoFlushFailureTest")
public class NoFlushFailureTest {
- CacheManager cm1;
+ CacheContainer cm1;
private static final String FILE = "configs/no-flush.xml";
@Test (expectedExceptions = ConfigurationException.class)
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithTMTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithTMTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithTMTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithoutTMTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithoutTMTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/batch/BatchWithoutTMTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,6 @@
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.config.Configuration;
import org.infinispan.config.ConfigurationException;
-import org.infinispan.manager.CacheManager;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/LockTestBase.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/LockTestBase.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/LockTestBase.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.context.InvocationContextContainer;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -28,7 +28,7 @@
private Log log = LogFactory.getLog(LockTestBase.class);
protected boolean repeatableRead = true;
protected boolean lockParentForChildInsertRemove = false;
- private CacheManager cm;
+ private CacheContainer cm;
protected class LockTestBaseTL {
public Cache<String, String> cache;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/repeatable_read/WriteSkewTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/repeatable_read/WriteSkewTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/api/mvcc/repeatable_read/WriteSkewTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,6 @@
import org.infinispan.api.mvcc.LockAssert;
import org.infinispan.config.Configuration;
import org.infinispan.context.InvocationContextContainer;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/atomic/APITest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/atomic/APITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/atomic/APITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -25,7 +25,7 @@
import static org.infinispan.atomic.AtomicHashMapTestAssertions.assertIsEmpty;
import static org.infinispan.atomic.AtomicHashMapTestAssertions.assertIsEmptyMap;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -43,20 +43,20 @@
Cache<String, Object> cache;
TransactionManager tm;
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
@BeforeTest
public void setUp() {
Configuration c = new Configuration();
c.setInvocationBatchingEnabled(true);
- cacheManager = TestCacheManagerFactory.createCacheManager(c, true);
- cache = cacheManager.getCache();
+ cacheContainer = TestCacheManagerFactory.createCacheManager(c, true);
+ cache = cacheContainer.getCache();
tm = TestingUtil.getTransactionManager(cache);
}
@AfterTest
public void tearDown() {
- TestingUtil.killCacheManagers(cacheManager);
+ TestingUtil.killCacheManagers(cacheContainer);
cache =null;
tm = null;
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicHashMapConcurrencyTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicHashMapConcurrencyTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicHashMapConcurrencyTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -26,7 +26,7 @@
public static final String KEY = "key";
Cache<String, Object> cache;
TransactionManager tm;
- private CacheManager cm;
+ private CacheContainer cm;
enum Operation {
PUT,
Modified: branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicMapFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicMapFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/atomic/AtomicMapFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import static org.infinispan.context.Flag.SKIP_LOCKING;
import org.infinispan.context.InvocationContext;
import org.infinispan.context.InvocationContextContainer;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -23,7 +23,7 @@
private static final Log log = LogFactory.getLog(AtomicMapFunctionalTest.class);
Cache<String, Object> cache;
TransactionManager tm;
- private CacheManager cm;
+ private CacheContainer cm;
@BeforeMethod
@SuppressWarnings("unchecked")
Modified: branches/4.1.x/core/src/test/java/org/infinispan/config/CustomInterceptorConfigTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/config/CustomInterceptorConfigTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/config/CustomInterceptorConfigTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import org.infinispan.Cache;
import org.infinispan.interceptors.InvocationContextInterceptor;
import org.infinispan.interceptors.base.CommandInterceptor;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterMethod;
@@ -16,7 +16,7 @@
@Test(testName = "config.CustomInterceptorConfigTest", groups = "functional")
public class CustomInterceptorConfigTest {
Cache c;
- CacheManager cm;
+ CacheContainer cm;
public void testCustomInterceptors() throws IOException {
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
Modified: branches/4.1.x/core/src/test/java/org/infinispan/config/ProgrammaticConfigurationTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/config/ProgrammaticConfigurationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/config/ProgrammaticConfigurationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,5 @@
package org.infinispan.config;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/config/SampleConfigFilesCorrectnessTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/config/SampleConfigFilesCorrectnessTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/config/SampleConfigFilesCorrectnessTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.LoggingEvent;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/config/parsing/Coherence2InfinispanTransformerTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/config/parsing/Coherence2InfinispanTransformerTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/config/parsing/Coherence2InfinispanTransformerTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,7 @@
package org.infinispan.config.parsing;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -10,7 +10,6 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileOutputStream;
/**
* //todo re-enable test as it makes the suite hang
@@ -34,7 +33,7 @@
*/
private void testAllFile(String coherenceFileName) throws Exception {
ClassLoader existingCl = Thread.currentThread().getContextClassLoader();
- CacheManager dcm = null;
+ CacheContainer dcm = null;
Cache<Object, Object> sampleDistributedCache2 = null;
try {
ClassLoader delegatingCl = new Jbc2InfinispanTransformerTest.TestClassLoader(existingCl);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistCacheStoreTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistCacheStoreTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistCacheStoreTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -24,7 +24,6 @@
import org.infinispan.config.CacheLoaderManagerConfig;
import org.infinispan.config.Configuration;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/BaseDistFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -8,7 +8,7 @@
import org.infinispan.container.entries.ImmortalCacheEntry;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.container.entries.MortalCacheEntry;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.Address;
import org.infinispan.test.MultipleCacheManagersTest;
@@ -120,7 +120,7 @@
private void reorderBasedOnCHPositions() {
// wait for all joiners to join
List<Cache> clist = new ArrayList<Cache>(cacheManagers.size());
- for (CacheManager cm : cacheManagers) clist.add(cm.getCache(cacheName));
+ for (CacheContainer cm : cacheManagers) clist.add(cm.getCache(cacheName));
assert clist.size() == INIT_CLUSTER_SIZE;
waitForJoinTasksToComplete(SECONDS.toMillis(480), clist.toArray(new Cache[clist.size()]));
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/ConcurrentStartWithReplTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/ConcurrentStartWithReplTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/ConcurrentStartWithReplTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,26 +3,21 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.util.concurrent.AbstractInProcessFuture;
-import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
/**
* Tests concurrent startup of replicated and distributed caches
@@ -143,7 +138,7 @@
}
}
- private Future<Cache<String, String>> startCache(final CacheManager cm, final String cacheName, boolean nonBlockingStartup) {
+ private Future<Cache<String, String>> startCache(final CacheContainer cm, final String cacheName, boolean nonBlockingStartup) {
final Callable<Cache<String, String>> cacheCreator = new Callable<Cache<String, String>>() {
@Override
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/SingleOwnerTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/SingleOwnerTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/SingleOwnerTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -26,7 +26,6 @@
import org.infinispan.Cache;
import org.infinispan.CacheException;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.Address;
import org.infinispan.util.concurrent.IsolationLevel;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/UnknownCacheStartTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/UnknownCacheStartTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/UnknownCacheStartTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,13 +3,8 @@
import org.infinispan.Cache;
import org.infinispan.CacheException;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
-import org.infinispan.test.AbstractCacheTest;
import org.infinispan.test.AbstractInfinispanTest;
-import org.infinispan.test.MultipleCacheManagersTest;
-import org.infinispan.test.TestingUtil;
-import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentJoinTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentJoinTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentJoinTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.distribution.rehash;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentNonOverlappingLeaveTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentNonOverlappingLeaveTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentNonOverlappingLeaveTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.distribution.rehash;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.Address;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
@@ -15,8 +15,8 @@
l1 = addressOf(c2);
l2 = addressOf(c4);
- CacheManager cm2 = c2.getCacheManager();
- CacheManager cm4 = c4.getCacheManager();
+ CacheContainer cm2 = c2.getCacheManager();
+ CacheContainer cm4 = c4.getCacheManager();
cacheManagers.removeAll(Arrays.asList(cm2, cm4));
caches.removeAll(Arrays.asList(c2, c4));
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentOverlappingLeaveTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentOverlappingLeaveTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/ConcurrentOverlappingLeaveTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.distribution.rehash;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.Address;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
@@ -15,8 +15,8 @@
l1 = addressOf(c3);
l2 = addressOf(c4);
- CacheManager cm3 = c3.getCacheManager();
- CacheManager cm4 = c4.getCacheManager();
+ CacheContainer cm3 = c3.getCacheManager();
+ CacheContainer cm4 = c4.getCacheManager();
cacheManagers.removeAll(Arrays.asList(cm3, cm4));
caches.removeAll(Arrays.asList(c3, c4));
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/L1OnRehashTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/L1OnRehashTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/L1OnRehashTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.infinispan.distribution.BaseDistFunctionalTest;
-import org.infinispan.manager.CacheManager;
import org.testng.annotations.Test;
import java.util.ArrayList;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashAfterPartitionMergeTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashAfterPartitionMergeTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashAfterPartitionMergeTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,9 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.config.GlobalConfiguration;
import org.infinispan.distribution.BaseDistFunctionalTest;
-import org.infinispan.manager.CacheManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged;
import org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent;
@@ -12,23 +10,15 @@
import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
-import org.infinispan.test.fwk.JGroupsConfigBuilder;
-import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.jgroups.Channel;
import org.jgroups.protocols.DISCARD;
import org.jgroups.protocols.TP;
import org.jgroups.stack.ProtocolStack;
import org.testng.annotations.Test;
-import java.util.Arrays;
import java.util.List;
-import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
-import static org.infinispan.remoting.transport.jgroups.JGroupsTransport.CONFIGURATION_STRING;
-import static org.infinispan.test.fwk.TestCacheManagerFactory.amendMarshaller;
-import static org.infinispan.test.fwk.TestCacheManagerFactory.minimizeThreads;
-
@Test(groups = "functional", testName = "distribution.rehash.RehashAfterPartitionMergeTest")
public class RehashAfterPartitionMergeTest extends MultipleCacheManagersTest {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashCompletedOnJoinTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashCompletedOnJoinTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/RehashCompletedOnJoinTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.Cache;
import org.infinispan.distribution.BaseDistFunctionalTest;
import org.infinispan.distribution.DistributionManager;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleJoinTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleJoinTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleJoinTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.distribution.rehash;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleLeaveTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleLeaveTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/distribution/rehash/SingleLeaveTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.distribution.rehash;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.Address;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
@@ -12,7 +12,7 @@
void performRehashEvent(boolean offline) {
// cause a node to LEAVE. Typically this is c4.
leaverAddress = addressOf(c4);
- CacheManager cm4 = c4.getCacheManager();
+ CacheContainer cm4 = c4.getCacheManager();
cacheManagers.remove(cm4);
caches.remove(c4);
TestingUtil.killCacheManagers(cm4);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesEvictionTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesEvictionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesEvictionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -28,7 +28,6 @@
import org.infinispan.config.Configuration;
import org.infinispan.context.InvocationContext;
import org.infinispan.interceptors.MarshalledValueInterceptor;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.marshall.MarshalledValue;
import org.infinispan.marshall.MarshalledValueTest;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesManualEvictionTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesManualEvictionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/eviction/MarshalledValuesManualEvictionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -25,7 +25,6 @@
import org.infinispan.config.Configuration;
import org.infinispan.eviction.MarshalledValuesEvictionTest.MockMarshalledValueInterceptor;
import org.infinispan.interceptors.MarshalledValueInterceptor;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.marshall.MarshalledValueTest;
import org.infinispan.marshall.Marshaller;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/expiry/ExpiryTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/expiry/ExpiryTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/expiry/ExpiryTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import org.infinispan.Cache;
import org.infinispan.container.DataContainer;
import org.infinispan.container.entries.InternalCacheEntry;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -19,7 +19,7 @@
@Test(groups = "functional", testName = "expiry.ExpiryTest")
public class ExpiryTest extends AbstractInfinispanTest {
- CacheManager cm;
+ CacheContainer cm;
@BeforeMethod
public void setUp() {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/interceptors/MarshalledValueInterceptorTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/interceptors/MarshalledValueInterceptorTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/interceptors/MarshalledValueInterceptorTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.marshall.MarshalledValue;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -30,7 +30,7 @@
import org.infinispan.CacheException;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
@@ -86,12 +86,12 @@
ObjectName defaultOn = new ObjectName(otherJmxDomain + ":cache-name=" + DefaultCacheManager.DEFAULT_CACHE_NAME + "(local),jmx-resource=Cache");
ObjectName galderOn = new ObjectName(otherJmxDomain + ":cache-name=galder(local),jmx-resource=Cache");
ObjectName managerON = new ObjectName(otherJmxDomain + ":cache-name=[global],jmx-resource=CacheManager");
- CacheManager otherManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain);
+ CacheContainer otherContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain);
server.invoke(managerON, "startCache", new Object[]{}, new String[]{});
server.invoke(managerON, "startCache", new Object[]{"galder"}, new String[]{String.class.getName()});
assert ComponentStatus.RUNNING.toString().equals(server.getAttribute(defaultOn, "CacheStatus"));
assert ComponentStatus.RUNNING.toString().equals(server.getAttribute(galderOn, "CacheStatus"));
- otherManager.stop();
+ otherContainer.stop();
try {
log.info(server.getMBeanInfo(managerON));
assert false : "Failure expected, " + managerON + " shouldn't be registered in mbean server";
@@ -111,24 +111,24 @@
public void testDuplicateJmxDomainOnlyCacheExposesJmxStatistics() throws Exception {
- CacheManager otherManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(JMX_DOMAIN, false, true);
+ CacheContainer otherContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(JMX_DOMAIN, false, true);
try {
- otherManager.getCache();
+ otherContainer.getCache();
assert false : "Failure expected, " + JMX_DOMAIN + " is a duplicate!";
} catch (CacheException e) {
assert e.getCause().getCause() instanceof JmxDomainConflictException;
} finally {
- otherManager.stop();
+ otherContainer.stop();
}
}
public void testMalformedCacheName(Method m) throws Exception {
final String otherJmxDomain = JMX_DOMAIN + '.' + m.getName();
- CacheManager otherManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain);
+ CacheContainer otherContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain);
try {
- otherManager.getCache("persistence.unit:unitName=#helloworld.MyRegion");
+ otherContainer.getCache("persistence.unit:unitName=#helloworld.MyRegion");
} finally {
- otherManager.stop();
+ otherContainer.stop();
}
}
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheManagerMBeanTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheManagerMBeanTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/CacheManagerMBeanTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import java.lang.reflect.Method;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -79,12 +79,12 @@
public void testJmxRegistrationAtStartupAndStop(Method method) throws Exception {
final String otherJmxDomain = JMX_DOMAIN + '.' + method.getName();
- CacheManager otherManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain, true, false);
+ CacheContainer otherContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain, true, false);
ObjectName otherName = new ObjectName(otherJmxDomain + ":cache-name=[global],jmx-resource=CacheManager");
try {
assert server.getAttribute(otherName, "CreatedCacheCount").equals("0");
} finally {
- otherManager.stop();
+ otherContainer.stop();
}
try {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/ComponentsJmxRegistrationTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/ComponentsJmxRegistrationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/ComponentsJmxRegistrationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.factories.AbstractComponentRegistry;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
@@ -32,26 +32,26 @@
public class ComponentsJmxRegistrationTest extends AbstractInfinispanTest {
private MBeanServer mBeanServer;
- private List<CacheManager> cacheManagers = new ArrayList<CacheManager>();
+ private List<CacheContainer> cacheContainers = new ArrayList<CacheContainer>();
@BeforeMethod
public void setUp() {
mBeanServer = MBeanServerFactory.createMBeanServer();
- cacheManagers.clear();
+ cacheContainers.clear();
}
@AfterMethod
public void tearDown() {
MBeanServerFactory.releaseMBeanServer(mBeanServer);
- for (CacheManager cacheManager : cacheManagers) {
- TestingUtil.killCacheManagers(cacheManager);
+ for (CacheContainer cacheContainer : cacheContainers) {
+ TestingUtil.killCacheManagers(cacheContainer);
}
- cacheManagers.clear();
+ cacheContainers.clear();
}
public void testRegisterLocalCache() throws Exception {
EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
- cacheManagers.add(cm);
+ cacheContainers.add(cm);
cm.start();
Configuration configuration = config();
configuration.setCacheMode(Configuration.CacheMode.LOCAL);
@@ -78,7 +78,7 @@
GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
globalConfiguration.setAllowDuplicateDomains(true);
EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
- cacheManagers.add(cm);
+ cacheContainers.add(cm);
cm.start();
Configuration configurationOverride = config();
configurationOverride.setCacheMode(Configuration.CacheMode.REPL_SYNC);
@@ -99,7 +99,7 @@
GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
globalConfiguration.setAllowDuplicateDomains(true);
EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
- cacheManagers.add(cm);
+ cacheContainers.add(cm);
cm.start();
Configuration replicated = config();
Configuration local = config();
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/JmxStatsFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/JmxStatsFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/JmxStatsFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
@@ -171,13 +171,13 @@
server = PerThreadMBeanServerLookup.getThreadMBeanServer();
globalConfiguration2.setAllowDuplicateDomains(true);
- CacheManager duplicateAllowedManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration2);
+ CacheContainer duplicateAllowedContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration2);
try {
final String duplicateName = jmxDomain + "2";
ObjectName duplicateObjectName = new ObjectName(duplicateName + ":cache-name=[global],jmx-resource=CacheManager");
server.getAttribute(duplicateObjectName, "CreatedCacheCount").equals("0");
} finally {
- duplicateAllowedManager.stop();
+ duplicateAllowedContainer.stop();
}
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/RpcManagerMBeanTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/RpcManagerMBeanTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/RpcManagerMBeanTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -6,7 +6,7 @@
import org.infinispan.commands.ReplicableCommand;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.rpc.ResponseFilter;
import org.infinispan.remoting.rpc.ResponseMode;
import org.infinispan.remoting.rpc.RpcManager;
@@ -59,7 +59,7 @@
globalConfiguration.setAllowDuplicateDomains(true);
globalConfiguration.setJmxDomain(JMX_DOMAIN);
globalConfiguration.setMBeanServerLookup(PerThreadMBeanServerLookup.class.getName());
- CacheManager cacheManager1 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration);
+ CacheContainer cacheManager1 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration);
cacheManager1.start();
GlobalConfiguration globalConfiguration2 = GlobalConfiguration.getClusteredDefault();
@@ -67,7 +67,7 @@
globalConfiguration2.setMBeanServerLookup(PerThreadMBeanServerLookup.class.getName());
globalConfiguration2.setJmxDomain(JMX_DOMAIN);
globalConfiguration2.setAllowDuplicateDomains(true);
- CacheManager cacheManager2 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration2);
+ CacheContainer cacheManager2 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration2);
cacheManager2.start();
registerCacheManager(cacheManager1, cacheManager2);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jmx/TxInterceptorMBeanTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jmx/TxInterceptorMBeanTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jmx/TxInterceptorMBeanTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/jndi/BindingTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/jndi/BindingTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/jndi/BindingTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -35,7 +35,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -83,7 +83,7 @@
public void testBindCacheManagerToJndi() throws Exception {
Context ctx = new InitialContext(props);
String jndiName = "java:CacheManager";
- bind(jndiName, cacheManager, CacheManager.class, ctx);
+ bind(jndiName, cacheManager, CacheContainer.class, ctx);
try {
Context ctx2 = new InitialContext(props);
try {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/BaseCacheStoreFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/BaseCacheStoreFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/BaseCacheStoreFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -26,10 +26,9 @@
import org.infinispan.atomic.AtomicMapLookup;
import org.infinispan.config.CacheLoaderManagerConfig;
import org.infinispan.config.Configuration;
-import org.infinispan.config.GlobalConfiguration;
import org.infinispan.container.DataContainer;
import org.infinispan.container.entries.InternalCacheEntry;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
@@ -40,7 +39,6 @@
import javax.transaction.TransactionManager;
import java.lang.reflect.Method;
-import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -107,7 +105,7 @@
cacheLoaders.addCacheLoaderConfig(csConfig);
Configuration cfg = TestCacheManagerFactory.getDefaultConfiguration(false);
cfg.setCacheLoaderManagerConfig(cacheLoaders);
- CacheManager local = TestCacheManagerFactory.createCacheManager(cfg);
+ CacheContainer local = TestCacheManagerFactory.createCacheManager(cfg);
try {
Cache<String, String> cache = local.getCache();
cacheNames.add(cache.getName());
@@ -136,9 +134,9 @@
public void testRestoreAtomicMap(Method m) {
Configuration cfg = new Configuration();
cfg.getCacheLoaderManagerConfig().addCacheLoaderConfig(csConfig);
- CacheManager localCacheManager = TestCacheManagerFactory.createCacheManager(cfg, true);
+ CacheContainer localCacheContainer = TestCacheManagerFactory.createCacheManager(cfg, true);
try {
- Cache<String, Object> cache = localCacheManager.getCache();
+ Cache<String, Object> cache = localCacheContainer.getCache();
cacheNames.add(cache.getName());
AtomicMap<String, String> map = AtomicMapLookup.getAtomicMap(cache, m.getName());
map.put("a", "b");
@@ -149,16 +147,16 @@
// now re-retrieve the map
assert AtomicMapLookup.getAtomicMap(cache, m.getName()).get("a").equals("b");
} finally {
- TestingUtil.killCacheManagers(localCacheManager);
+ TestingUtil.killCacheManagers(localCacheContainer);
}
}
public void testRestoreTransactionalAtomicMap(Method m) throws Exception {
Configuration cfg = new Configuration();
cfg.getCacheLoaderManagerConfig().addCacheLoaderConfig(csConfig);
- CacheManager localCacheManager = TestCacheManagerFactory.createCacheManager(cfg, true);
+ CacheContainer localCacheContainer = TestCacheManagerFactory.createCacheManager(cfg, true);
try {
- Cache<String, Object> cache = localCacheManager.getCache();
+ Cache<String, Object> cache = localCacheContainer.getCache();
cacheNames.add(cache.getName());
TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
tm.begin();
@@ -172,7 +170,7 @@
// now re-retrieve the map and make sure we see the diffs
assert AtomicMapLookup.getAtomicMap(cache, m.getName()).get("a").equals("b");
} finally {
- TestingUtil.killCacheManagers(localCacheManager);
+ TestingUtil.killCacheManagers(localCacheContainer);
}
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/CacheLoaderFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/CacheLoaderFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/CacheLoaderFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -9,14 +9,12 @@
import org.infinispan.container.entries.InternalEntryFactory;
import org.infinispan.lifecycle.ComponentStatus;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
-import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/ClusterCacheLoaderTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/ClusterCacheLoaderTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/ClusterCacheLoaderTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -7,7 +7,6 @@
import org.infinispan.loaders.cluster.ClusterCacheLoaderConfig;
import org.infinispan.loaders.decorators.ChainingCacheStore;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/ConcurrentLoadAndEvictTxTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/ConcurrentLoadAndEvictTxTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/ConcurrentLoadAndEvictTxTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.infinispan.config.Configuration;
import org.infinispan.eviction.EvictionStrategy;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/PassivationFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/PassivationFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/PassivationFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -31,7 +31,7 @@
CacheStore store;
TransactionManager tm;
Configuration cfg;
- CacheManager cm;
+ CacheContainer cm;
long lifespan = 6000000; // very large lifespan so nothing actually expires
@BeforeTest
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/decorators/SingletonStoreTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/decorators/SingletonStoreTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/decorators/SingletonStoreTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -8,7 +8,6 @@
import org.infinispan.loaders.CacheLoaderManager;
import org.infinispan.loaders.CacheStore;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/loaders/file/ClusterFileCacheStoreFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/loaders/file/ClusterFileCacheStoreFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/loaders/file/ClusterFileCacheStoreFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -7,15 +7,11 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.loaders.CacheStoreConfig;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Optional;
-import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/manager/CacheManagerTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/manager/CacheManagerTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/manager/CacheManagerTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -57,7 +57,7 @@
}
public void testStartAndStop() {
- CacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
+ CacheContainer cm = TestCacheManagerFactory.createLocalCacheManager();
try {
Cache c1 = cm.getCache("cache1");
Cache c2 = cm.getCache("cache2");
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/AsyncNotificationTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/AsyncNotificationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/AsyncNotificationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,8 +1,8 @@
package org.infinispan.notifications;
import org.infinispan.Cache;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.fwk.TestCacheManagerFactory;
-import org.infinispan.manager.CacheManager;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent;
import org.infinispan.test.AbstractInfinispanTest;
@@ -16,7 +16,7 @@
@Test(groups = "functional", testName = "notifications.AsyncNotificationTest")
public class AsyncNotificationTest extends AbstractInfinispanTest {
Cache<String, String> c;
- CacheManager cm;
+ CacheContainer cm;
@BeforeMethod
public void setUp() {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerCacheLoaderTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerCacheLoaderTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerCacheLoaderTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.infinispan.config.CacheLoaderManagerConfig;
import org.infinispan.config.Configuration;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryActivated;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryLoaded;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerRemovalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerRemovalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/CacheListenerRemovalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.test.fwk.TestCacheManagerFactory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryVisited;
import org.infinispan.notifications.cachelistener.event.Event;
import org.infinispan.test.AbstractInfinispanTest;
@@ -19,7 +19,7 @@
@Test(groups = "functional", testName = "notifications.CacheListenerRemovalTest")
public class CacheListenerRemovalTest extends AbstractInfinispanTest {
Cache<String, String> cache;
- CacheManager cm;
+ CacheContainer cm;
@BeforeMethod
public void setUp() {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/ConcurrentNotificationTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/ConcurrentNotificationTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/ConcurrentNotificationTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,7 @@
package org.infinispan.notifications;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved;
@@ -24,7 +24,7 @@
@Test(groups = "functional", testName = "notifications.ConcurrentNotificationTest")
public class ConcurrentNotificationTest extends AbstractInfinispanTest {
Cache<String, String> cache;
- CacheManager cm;
+ CacheContainer cm;
CacheListener listener;
Log log = LogFactory.getLog(ConcurrentNotificationTest.class);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.context.InvocationContext;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -32,7 +32,7 @@
Configuration c = new Configuration();
c.setCacheMode(Configuration.CacheMode.LOCAL);
c.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
- CacheManager cm = TestCacheManagerFactory.createCacheManager(c, true);
+ CacheContainer cm = TestCacheManagerFactory.createCacheManager(c, true);
cache = cm.getCache();
tm = TestingUtil.getTransactionManager(cache);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachemanagerlistener/CacheManagerNotifierTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachemanagerlistener/CacheManagerNotifierTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/notifications/cachemanagerlistener/CacheManagerNotifierTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged;
@@ -18,8 +18,6 @@
import org.testng.annotations.Test;
import java.util.List;
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
@Test(groups = "unit", testName = "notifications.cachemanagerlistener.CacheManagerNotifierTest")
@@ -94,12 +92,12 @@
CyclicBarrier barrier = new CyclicBarrier(2);
GetCacheManagerCheckListener listener = new GetCacheManagerCheckListener(barrier);
cmA.addListener(listener);
- CacheManager cmB = TestCacheManagerFactory.createClusteredCacheManager();
+ CacheContainer cmB = TestCacheManagerFactory.createClusteredCacheManager();
cmB.getCache();
try {
barrier.await();
barrier.await();
- assert listener.cacheManager != null;
+ assert listener.cacheContainer != null;
} finally {
TestingUtil.killCacheManagers(cmA, cmB);
}
@@ -107,7 +105,7 @@
@Listener
public class GetCacheManagerCheckListener {
- CacheManager cacheManager;
+ CacheContainer cacheContainer;
CyclicBarrier barrier;
public GetCacheManagerCheckListener(CyclicBarrier barrier) {
@@ -117,7 +115,7 @@
@ViewChanged
public void onViewChange(ViewChangedEvent e) throws Exception {
barrier.await();
- cacheManager = e.getCacheManager();
+ cacheContainer = e.getCacheManager();
barrier.await();
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/profiling/DeadlockDetectionPerformanceTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/profiling/DeadlockDetectionPerformanceTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/profiling/DeadlockDetectionPerformanceTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
@@ -125,7 +125,7 @@
private void runDistributedTest() throws Exception {
EmbeddedCacheManager cm = null;
- List<CacheManager> managers = new ArrayList<CacheManager>();
+ List<CacheContainer> containers = new ArrayList<CacheContainer>();
try {
CountDownLatch startLatch = new CountDownLatch(1);
List<ExecutorThread> executorThreads = new ArrayList<ExecutorThread>();
@@ -137,15 +137,15 @@
Cache distCache = cm.getCache("test");
ExecutorThread executorThread = new ExecutorThread(startLatch, distCache);
executorThreads.add(executorThread);
- managers.add(cm);
+ containers.add(cm);
}
- TestingUtil.blockUntilViewsReceived(10000, managers.toArray(new CacheManager[managers.size()]));
+ TestingUtil.blockUntilViewsReceived(10000, containers.toArray(new CacheContainer[containers.size()]));
startLatch.countDown();
Thread.sleep(BENCHMARK_DURATION);
joinThreadsAndPrintResult(executorThreads);
} finally {
- log.trace("About to kill cache managers: " + managers);
- TestingUtil.killCacheManagers(managers);
+ log.trace("About to kill cache managers: " + containers);
+ TestingUtil.killCacheManagers(containers);
}
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/remoting/jgroups/ChannelLookupTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/remoting/jgroups/ChannelLookupTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/remoting/jgroups/ChannelLookupTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import org.easymock.classextension.EasyMock;
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.factories.GlobalComponentRegistry;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.Transport;
import org.infinispan.remoting.transport.jgroups.JGroupsChannelLookup;
import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
@@ -22,7 +22,7 @@
@Test(testName = "remoting.jgroups.ChannelLookupTest", groups = "functional")
public class ChannelLookupTest extends AbstractInfinispanTest {
public void channelLookupTest() {
- CacheManager cm = null;
+ CacheContainer cm = null;
try {
GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
Properties p = new Properties();
Modified: branches/4.1.x/core/src/test/java/org/infinispan/replication/ReplicationQueueTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/replication/ReplicationQueueTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/replication/ReplicationQueueTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,12 +5,11 @@
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.executors.ScheduledExecutorFactory;
import org.infinispan.factories.KnownComponentNames;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.ReplicationQueue;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
@@ -38,8 +37,8 @@
GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
globalConfiguration.setReplicationQueueScheduledExecutorFactoryClass(ReplQueueTestScheduledExecutorFactory.class.getName());
globalConfiguration.setReplicationQueueScheduledExecutorProperties(ReplQueueTestScheduledExecutorFactory.myProps);
- CacheManager first = TestCacheManagerFactory.createCacheManager(globalConfiguration);
- CacheManager second = TestCacheManagerFactory.createCacheManager(globalConfiguration);
+ CacheContainer first = TestCacheManagerFactory.createCacheManager(globalConfiguration);
+ CacheContainer second = TestCacheManagerFactory.createCacheManager(globalConfiguration);
registerCacheManager(first, second);
Configuration config = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC, true);
Modified: branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferCacheLoaderFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferCacheLoaderFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferCacheLoaderFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -6,7 +6,6 @@
import org.infinispan.loaders.CacheLoaderManager;
import org.infinispan.loaders.CacheStoreConfig;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFetchOnlyPersistentStateTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFetchOnlyPersistentStateTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFetchOnlyPersistentStateTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -29,7 +29,6 @@
import org.infinispan.config.Configuration;
import org.infinispan.loaders.CacheStoreConfig;
import org.infinispan.loaders.dummy.DummyInMemoryCacheStore;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.testng.annotations.Test;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFileCacheLoaderFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFileCacheLoaderFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFileCacheLoaderFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -33,7 +33,7 @@
import org.infinispan.config.CacheLoaderManagerConfig;
import org.infinispan.config.Configuration;
import org.infinispan.loaders.file.FileCacheStoreConfig;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
@@ -100,7 +100,7 @@
config.setUseLockStriping(false); // reduces the odd chance of a key collision and deadlock
}
- protected CacheManager createCacheManager(String tmpDirectory) {
+ protected CacheContainer createCacheManager(String tmpDirectory) {
// increment the DIMCS store id
FileCacheStoreConfig cfg = new FileCacheStoreConfig();
cfg.setLocation(tmpDirectory);
@@ -118,7 +118,7 @@
}
public void testSharedLoader() throws Exception {
- CacheManager cm1 = null, cm2 = null;
+ CacheContainer cm1 = null, cm2 = null;
try {
sharedCacheLoader.set(true);
cm1 = createCacheManager(tmpDirectory1);
@@ -148,7 +148,7 @@
public void testInitialStateTransfer() throws Exception {
testCount++;
log.info("testInitialStateTransfer start - " + testCount);
- CacheManager cm1 = null, cm2 = null;
+ CacheContainer cm1 = null, cm2 = null;
try {
Cache<Object, Object> cache1, cache2;
cm1 = createCacheManager(tmpDirectory1);
@@ -172,7 +172,7 @@
public void testInitialStateTransferInDifferentThread(Method m) throws Exception {
testCount++;
log.info(m.getName() + " start - " + testCount);
- CacheManager cm1 = null, cm2 = null, cm30 = null;
+ CacheContainer cm1 = null, cm2 = null, cm30 = null;
try {
Cache<Object, Object> cache1 = null, cache2 = null, cache3 = null;
cm1 = createCacheManager(tmpDirectory1);
@@ -188,7 +188,7 @@
TestingUtil.blockUntilViewsReceived(60000, cache1, cache2);
verifyInitialData(cache2);
- final CacheManager cm3 = createCacheManager(tmpDirectory3);
+ final CacheContainer cm3 = createCacheManager(tmpDirectory3);
cm30 = cm3;
@@ -220,7 +220,7 @@
public void testConcurrentStateTransfer() throws Exception {
testCount++;
log.info("testConcurrentStateTransfer start - " + testCount);
- CacheManager cm1 = null, cm2 = null, cm30 = null, cm40 = null;
+ CacheContainer cm1 = null, cm2 = null, cm30 = null, cm40 = null;
try {
Cache<Object, Object> cache1 = null, cache2 = null, cache3 = null, cache4 = null;
cm1 = createCacheManager(tmpDirectory1);
@@ -236,8 +236,8 @@
TestingUtil.blockUntilViewsReceived(60000, cache1, cache2);
verifyInitialData(cache2);
- final CacheManager cm3 = createCacheManager(tmpDirectory3);
- final CacheManager cm4 = createCacheManager(tmpDirectory4);
+ final CacheContainer cm3 = createCacheManager(tmpDirectory3);
+ final CacheContainer cm4 = createCacheManager(tmpDirectory4);
cm30 = cm3;
cm40 = cm4;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFunctionalTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFunctionalTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/statetransfer/StateTransferFunctionalTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
@@ -186,8 +186,8 @@
TestingUtil.blockUntilViewsReceived(60000, cache1, cache2);
verifyInitialData(cache2);
- final CacheManager cm3 = createCacheManager();
- final CacheManager cm4 = createCacheManager();
+ final CacheContainer cm3 = createCacheManager();
+ final CacheContainer cm4 = createCacheManager();
Thread t1 = new Thread(new Runnable() {
public void run() {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/stress/PutIfAbsentStressTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/stress/PutIfAbsentStressTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/stress/PutIfAbsentStressTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -23,7 +23,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.Test;
@@ -70,7 +70,7 @@
* Testing putIfAbsent's behaviour on a Local cache.
*/
protected void testonInfinispanLocal() throws Exception {
- CacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
+ CacheContainer cm = TestCacheManagerFactory.createLocalCacheManager(false);
ConcurrentMap<String, String> map = cm.getCache();
try {
testConcurrentLocking(map);
@@ -101,13 +101,13 @@
* Adapter to run the test on any configuration
*/
private void testConcurrentLockingOnMultipleManagers(Configuration cfg) throws IOException, InterruptedException {
- List<CacheManager> cacheManagers = new ArrayList<CacheManager>(NODES_NUM);
+ List<CacheContainer> cacheContainers = new ArrayList<CacheContainer>(NODES_NUM);
List<Cache<String, String>> caches = new ArrayList<Cache<String, String>>();
List<ConcurrentMap<String, String>> maps = new ArrayList<ConcurrentMap<String, String>>(NODES_NUM
* THREAD_PER_NODE);
for (int nodeNum = 0; nodeNum < NODES_NUM; nodeNum++) {
- CacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(cfg);
- cacheManagers.add(cm);
+ CacheContainer cm = TestCacheManagerFactory.createClusteredCacheManager(cfg);
+ cacheContainers.add(cm);
Cache<String, String> cache = cm.getCache();
caches.add(cache);
for (int threadNum = 0; threadNum < THREAD_PER_NODE; threadNum++) {
@@ -118,7 +118,7 @@
try {
testConcurrentLocking(maps);
} finally {
- for (CacheManager cm : cacheManagers) {
+ for (CacheContainer cm : cacheContainers) {
try {
TestingUtil.killCacheManagers(cm);
} catch (Exception e) {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/AbstractCacheTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/AbstractCacheTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/AbstractCacheTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.util.logging.Log;
@@ -30,16 +30,16 @@
* use TestingUtil.clearContent(cacheManager);
*/
@Deprecated
- public void clearContent(CacheManager cacheManager) {
- TestingUtil.clearContent(cacheManager);
+ public void clearContent(CacheContainer cacheContainer) {
+ TestingUtil.clearContent(cacheContainer);
}
/**
* use TestingUtil.getRunningCaches(cacheManager);
*/
@Deprecated
- protected Set<Cache> getRunningCaches(CacheManager cacheManager) {
- return TestingUtil.getRunningCaches(cacheManager);
+ protected Set<Cache> getRunningCaches(CacheContainer cacheContainer) {
+ return TestingUtil.getRunningCaches(cacheContainer);
}
/**
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterClass;
@@ -12,8 +12,6 @@
import org.testng.annotations.Test;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.IdentityHashMap;
import java.util.List;
@@ -112,8 +110,8 @@
}
}
- final protected void registerCacheManager(CacheManager... cacheManagers) {
- for (CacheManager ecm : cacheManagers) {
+ final protected void registerCacheManager(CacheContainer... cacheContainers) {
+ for (CacheContainer ecm : cacheContainers) {
this.cacheManagers.add((EmbeddedCacheManager) ecm);
}
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/ReplListener.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/ReplListener.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/ReplListener.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -8,7 +8,6 @@
import org.infinispan.context.InvocationContext;
import org.infinispan.context.impl.TxInvocationContext;
import org.infinispan.interceptors.base.CommandInterceptor;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,11 +2,8 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
-import org.infinispan.util.logging.Log;
-import org.infinispan.util.logging.LogFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/TestingUtil.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/TestingUtil.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/TestingUtil.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -23,7 +23,7 @@
import org.infinispan.lifecycle.ComponentStatus;
import org.infinispan.loaders.CacheLoader;
import org.infinispan.loaders.CacheLoaderManager;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.ReplicationQueue;
@@ -146,28 +146,28 @@
/**
* Version of blockUntilViewsReceived that uses varargsa and cache managers
*/
- public static void blockUntilViewsReceived(long timeout, CacheManager... cacheManagers) {
- blockUntilViewsReceived(timeout, true, cacheManagers);
+ public static void blockUntilViewsReceived(long timeout, CacheContainer... cacheContainers) {
+ blockUntilViewsReceived(timeout, true, cacheContainers);
}
/**
* Waits for the given memebrs to be removed from the cluster. The difference between this and {@link
- * #blockUntilViewsReceived(long, org.infinispan.manager.CacheManager...)} methods(s) is that it does not barf if
+ * #blockUntilViewsReceived(long, org.infinispan.manager.CacheContainer...)} methods(s) is that it does not barf if
* more than expected memebers is in the cluster - this is because we expect to start with a grater number fo
* memebers than we eventually expect. It will barf though, if the number of members is not the one expected but
* only after the timeout expieres.
*/
- public static void blockForMemberToFail(long timeout, CacheManager... cacheManagers) {
- blockUntilViewsReceived(timeout, false, cacheManagers);
- areCacheViewsComplete(true, cacheManagers);
+ public static void blockForMemberToFail(long timeout, CacheContainer... cacheContainers) {
+ blockUntilViewsReceived(timeout, false, cacheContainers);
+ areCacheViewsComplete(true, cacheContainers);
}
- public static void blockUntilViewsReceived(long timeout, boolean barfIfTooManyMembers, CacheManager... cacheManagers) {
+ public static void blockUntilViewsReceived(long timeout, boolean barfIfTooManyMembers, CacheContainer... cacheContainers) {
long failTime = System.currentTimeMillis() + timeout;
while (System.currentTimeMillis() < failTime) {
sleepThread(100);
- if (areCacheViewsComplete(barfIfTooManyMembers, cacheManagers)) {
+ if (areCacheViewsComplete(barfIfTooManyMembers, cacheContainers)) {
return;
}
}
@@ -273,12 +273,12 @@
return true;
}
- public static boolean areCacheViewsComplete(boolean barfIfTooManyMembers, CacheManager... cacheManagers) {
- if (cacheManagers == null) throw new NullPointerException("Cache Manager array is null");
- int memberCount = cacheManagers.length;
+ public static boolean areCacheViewsComplete(boolean barfIfTooManyMembers, CacheContainer... cacheContainers) {
+ if (cacheContainers == null) throw new NullPointerException("Cache Manager array is null");
+ int memberCount = cacheContainers.length;
for (int i = 0; i < memberCount; i++) {
- EmbeddedCacheManager cacheManager = (EmbeddedCacheManager) cacheManagers[i];
+ EmbeddedCacheManager cacheManager = (EmbeddedCacheManager) cacheContainers[i];
if (!isCacheViewComplete(cacheManager.getMembers(), cacheManager.getAddress(), memberCount, barfIfTooManyMembers)) {
return false;
}
@@ -396,26 +396,26 @@
f.delete();
}
- public static void killCacheManagers(CacheManager... cacheManagers) {
- if (cacheManagers != null) {
- for (CacheManager cm : cacheManagers) {
+ public static void killCacheManagers(CacheContainer... cacheContainers) {
+ if (cacheContainers != null) {
+ for (CacheContainer cm : cacheContainers) {
if (cm != null)
cm.stop();
}
}
}
- public static void killCacheManagers(Collection<? extends CacheManager> cacheManagers) {
- killCacheManagers(cacheManagers.toArray(new CacheManager[cacheManagers.size()]));
+ public static void killCacheManagers(Collection<? extends CacheContainer> cacheManagers) {
+ killCacheManagers(cacheManagers.toArray(new CacheContainer[cacheManagers.size()]));
}
- public static void clearContent(CacheManager cacheManager) {
- if (cacheManager != null) {
- Set<Cache> runningCaches = getRunningCaches(cacheManager);
+ public static void clearContent(CacheContainer cacheContainer) {
+ if (cacheContainer != null) {
+ Set<Cache> runningCaches = getRunningCaches(cacheContainer);
for (Cache cache : runningCaches) {
clearRunningTx(cache);
}
- if (!((EmbeddedCacheManager)cacheManager).getStatus().allowInvocations()) return;
+ if (!((EmbeddedCacheManager) cacheContainer).getStatus().allowInvocations()) return;
for (Cache cache : runningCaches) {
removeInMemoryData(cache);
clearCacheLoader(cache);
@@ -425,8 +425,8 @@
}
}
- protected static Set<Cache> getRunningCaches(CacheManager cacheManager) {
- ConcurrentMap<String, Cache> caches = (ConcurrentMap<String, Cache>) TestingUtil.extractField(DefaultCacheManager.class, cacheManager, "caches");
+ protected static Set<Cache> getRunningCaches(CacheContainer cacheContainer) {
+ ConcurrentMap<String, Cache> caches = (ConcurrentMap<String, Cache>) TestingUtil.extractField(DefaultCacheManager.class, cacheContainer, "caches");
if (caches == null) return Collections.emptySet();
Set<Cache> result = new HashSet<Cache>();
for (Cache cache : caches.values()) {
@@ -550,8 +550,8 @@
return (ComponentRegistry) extractField(cache, "componentRegistry");
}
- public static GlobalComponentRegistry extractGlobalComponentRegistry(CacheManager cacheManager) {
- return (GlobalComponentRegistry) extractField(cacheManager, "globalComponentRegistry");
+ public static GlobalComponentRegistry extractGlobalComponentRegistry(CacheContainer cacheContainer) {
+ return (GlobalComponentRegistry) extractField(cacheContainer, "globalComponentRegistry");
}
public static LockManager extractLockManager(Cache cache) {
@@ -683,8 +683,8 @@
/**
* Extracts a component of a given type from the cache's internal component registry
*/
- public static <T> T extractGlobalComponent(CacheManager cacheManager, Class<T> componentType) {
- GlobalComponentRegistry gcr = extractGlobalComponentRegistry(cacheManager);
+ public static <T> T extractGlobalComponent(CacheContainer cacheContainer, Class<T> componentType) {
+ GlobalComponentRegistry gcr = extractGlobalComponentRegistry(cacheContainer);
return gcr.getComponent(componentType);
}
@@ -712,14 +712,14 @@
/**
* Replaces a component in a running cache manager (global component registry)
*
- * @param cacheManager cache in which to replace component
+ * @param cacheContainer cache in which to replace component
* @param componentType component type of which to replace
* @param replacementComponent new instance
* @param rewire if true, ComponentRegistry.rewire() is called after replacing.
* @return the original component that was replaced
*/
- public static <T> T replaceComponent(CacheManager cacheManager, Class<T> componentType, T replacementComponent, boolean rewire) {
- GlobalComponentRegistry cr = extractGlobalComponentRegistry(cacheManager);
+ public static <T> T replaceComponent(CacheContainer cacheContainer, Class<T> componentType, T replacementComponent, boolean rewire) {
+ GlobalComponentRegistry cr = extractGlobalComponentRegistry(cacheContainer);
T old = cr.getComponent(componentType);
cr.registerComponent(replacementComponent, componentType);
if (rewire) {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/ViewChangeListener.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/ViewChangeListener.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/ViewChangeListener.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,7 @@
package org.infinispan.test;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged;
@@ -16,7 +16,7 @@
*/
@Listener
public class ViewChangeListener {
- CacheManager cm;
+ CacheContainer cm;
final CountDownLatch latch = new CountDownLatch(1);
public ViewChangeListener(Cache c) {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/test/fwk/DebuggingUnitTestNGListener.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/test/fwk/DebuggingUnitTestNGListener.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/test/fwk/DebuggingUnitTestNGListener.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -24,9 +24,8 @@
import java.util.Set;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
-import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.util.concurrent.ConcurrentHashSet;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -56,7 +55,7 @@
}
private void checkCleanedUp(ITestContext testCxt) {
- CacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(new Configuration());
+ CacheContainer cm = TestCacheManagerFactory.createClusteredCacheManager(new Configuration());
try {
cm.start();
try {
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/LargeTransactionTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/LargeTransactionTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/LargeTransactionTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -32,18 +32,18 @@
c.setSyncRollbackPhase(true);
c.setUseLockStriping(false);
- CacheManager manager = TestCacheManagerFactory.createClusteredCacheManager(c);
- manager.start();
- manager.getCache();
- registerCacheManager(manager);
- Cache cache1 = manager.getCache("TestCache");
+ CacheContainer container = TestCacheManagerFactory.createClusteredCacheManager(c);
+ container.start();
+ container.getCache();
+ registerCacheManager(container);
+ Cache cache1 = container.getCache("TestCache");
assert cache1.getConfiguration().getCacheMode().equals(Configuration.CacheMode.REPL_SYNC);
cache1.start();
- manager = TestCacheManagerFactory.createClusteredCacheManager(c);
- manager.start();
- registerCacheManager(manager);
- Cache cache2 = manager.getCache("TestCache");
+ container = TestCacheManagerFactory.createClusteredCacheManager(c);
+ container.start();
+ registerCacheManager(container);
+ Cache cache2 = container.getCache("TestCache");
assert cache1.getConfiguration().getCacheMode().equals(Configuration.CacheMode.REPL_SYNC);
}
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/MarkAsRollbackTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/MarkAsRollbackTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/MarkAsRollbackTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.tx;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/OnePhaseXATest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/OnePhaseXATest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/OnePhaseXATest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -18,7 +18,7 @@
@Test(groups = "functional", testName = "tx.OnePhaseXATest", description = "See ISPN-156 for details.", enabled = false)
public class OnePhaseXATest extends AbstractInfinispanTest {
private List<Cache> caches;
- private List<CacheManager> cacheManagers;
+ private List<CacheContainer> cacheContainers;
public static final int CACHES_NUM = 2;
public void testMultipleCaches() throws Exception {
@@ -45,13 +45,13 @@
@BeforeTest
public void setUp() throws Exception {
caches = new ArrayList<Cache>();
- cacheManagers = new ArrayList<CacheManager>();
+ cacheContainers = new ArrayList<CacheContainer>();
for (int i = 0; i < CACHES_NUM; i++) caches.add(getCache());
}
@AfterTest
public void tearDown() {
- if (caches != null) TestingUtil.killCacheManagers(cacheManagers);
+ if (caches != null) TestingUtil.killCacheManagers(cacheContainers);
}
private Cache getCache() {
@@ -64,8 +64,8 @@
c.setLockAcquisitionTimeout(60000);
c.setUseLockStriping(false);
c.setSyncCommitPhase(true);
- CacheManager manager = TestCacheManagerFactory.createCacheManager(gc, c, true);
- cacheManagers.add(manager);
- return manager.getCache("TestCache");
+ CacheContainer container = TestCacheManagerFactory.createCacheManager(gc, c, true);
+ cacheContainers.add(container);
+ return container.getCache("TestCache");
}
}
\ No newline at end of file
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/StaleLockRecoveryTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/StaleLockRecoveryTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/StaleLockRecoveryTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningCaches.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningCaches.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningCaches.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
Modified: branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningReplicatedCaches.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningReplicatedCaches.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/core/src/test/java/org/infinispan/tx/TransactionsSpanningReplicatedCaches.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.MultipleCacheManagersTest;
import org.infinispan.test.TestingUtil;
import org.testng.annotations.Test;
@@ -14,7 +14,7 @@
@Test(groups = "functional", sequential = true, testName = "tx.TransactionsSpanningReplicatedCaches")
public class TransactionsSpanningReplicatedCaches extends MultipleCacheManagersTest {
- CacheManager cm1, cm2;
+ CacheContainer cm1, cm2;
public TransactionsSpanningReplicatedCaches() {
cleanup = CleanupPhase.AFTER_METHOD;
Modified: branches/4.1.x/demos/directory/src/main/java/org/infinispan/demos/directory/FilesystemDirectory.java
===================================================================
--- branches/4.1.x/demos/directory/src/main/java/org/infinispan/demos/directory/FilesystemDirectory.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/directory/src/main/java/org/infinispan/demos/directory/FilesystemDirectory.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.jgroups.util.Util;
Modified: branches/4.1.x/demos/ec2/src/main/java/org/infinispan/ec2demo/CacheBuilder.java
===================================================================
--- branches/4.1.x/demos/ec2/src/main/java/org/infinispan/ec2demo/CacheBuilder.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/ec2/src/main/java/org/infinispan/ec2demo/CacheBuilder.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import java.io.IOException;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.logging.Log;
@@ -38,13 +38,13 @@
}
class ShutdownHook extends Thread {
- private CacheManager currCache;
+ private CacheContainer currCache;
/**
- * @param cache_manager
+ * @param cache_container
*/
- public ShutdownHook(CacheManager cache_manager) {
- currCache = cache_manager;
+ public ShutdownHook(CacheContainer cache_container) {
+ currCache = cache_container;
}
public void run() {
Modified: branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/CacheManagerHolder.java
===================================================================
--- branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/CacheManagerHolder.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/CacheManagerHolder.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.demos.gridfs;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -21,7 +21,7 @@
private static final String DATA_CACHE_NAME_PROPERTY = "infinispan.gridfs.cache.data";
private static final String METADATA_CACHE_NAME_PROPERTY = "infinispan.gridfs.cache.metadata";
- public static CacheManager cacheManager;
+ public static CacheContainer cacheContainer;
public static String dataCacheName, metadataCacheName;
@Override
@@ -29,13 +29,13 @@
super.init(cfg);
String cfgFile = System.getProperty(CFG_PROPERTY, cfg.getInitParameter(CFG_PROPERTY));
if (cfgFile == null)
- cacheManager = new DefaultCacheManager();
+ cacheContainer = new DefaultCacheManager();
else {
try {
- cacheManager = new DefaultCacheManager(cfgFile);
+ cacheContainer = new DefaultCacheManager(cfgFile);
} catch (IOException e) {
log.error("Unable to start cache manager with config file " + cfgFile + ". Using DEFAULTS!");
- cacheManager = new DefaultCacheManager();
+ cacheContainer = new DefaultCacheManager();
}
}
Modified: branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/GridStore.java
===================================================================
--- branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/GridStore.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/gridfs-webdav/src/main/java/org/infinispan/demos/gridfs/GridStore.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -31,8 +31,8 @@
private File root = null;
public GridStore(File root) {
- data = CacheManagerHolder.cacheManager.getCache(CacheManagerHolder.dataCacheName);
- metadata = CacheManagerHolder.cacheManager.getCache(CacheManagerHolder.metadataCacheName);
+ data = CacheManagerHolder.cacheContainer.getCache(CacheManagerHolder.dataCacheName);
+ metadata = CacheManagerHolder.cacheContainer.getCache(CacheManagerHolder.metadataCacheName);
try {
data.start();
Modified: branches/4.1.x/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java
===================================================================
--- branches/4.1.x/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -3,7 +3,6 @@
import org.infinispan.Cache;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.notifications.Listener;
Modified: branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DemoActions.java
===================================================================
--- branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DemoActions.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DemoActions.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -42,7 +42,6 @@
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;
import org.infinispan.lucene.InfinispanDirectory;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.Address;
Modified: branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DirectoryFactory.java
===================================================================
--- branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DirectoryFactory.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/demos/lucene-directory-demo/src/main/java/org/infinispan/lucenedemo/DirectoryFactory.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -26,7 +26,7 @@
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.lucene.CacheKey;
import org.infinispan.lucene.InfinispanDirectory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
import org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup;
@@ -46,16 +46,16 @@
public static final String CACHE_NAME_FOR_INDEXES = "LuceneIndex";
- private static CacheManager manager = null;
+ private static CacheContainer container = null;
private static final Map<String, InfinispanDirectory> directories = new HashMap<String, InfinispanDirectory>();
private static Cache<CacheKey, Object> buildCacheForIndexes() {
return getCacheManager().getCache(CACHE_NAME_FOR_INDEXES);
}
- public static synchronized CacheManager getCacheManager() {
- if (manager != null)
- return manager;
+ public static synchronized CacheContainer getCacheManager() {
+ if (container != null)
+ return container;
GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
gc.setClusterName("infinispan-lucene-demo-cluster");
gc.setTransportClass(JGroupsTransport.class.getName());
@@ -69,8 +69,8 @@
config.setL1CacheEnabled(true);
config.setInvocationBatchingEnabled(true);
config.setL1Lifespan(6000000);
- manager = new DefaultCacheManager(gc, config, false);
- return manager;
+ container = new DefaultCacheManager(gc, config, false);
+ return container;
}
public static synchronized InfinispanDirectory getIndex(String indexName) {
@@ -83,8 +83,8 @@
}
public static synchronized void close() {
- if (manager!=null) {
- manager.stop();
+ if (container !=null) {
+ container.stop();
}
}
Modified: branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/CacheTestSupport.java
===================================================================
--- branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/CacheTestSupport.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/CacheTestSupport.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -35,7 +35,7 @@
import org.infinispan.config.Configuration.CacheMode;
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.lucene.testutils.LuceneSettings;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup;
import org.infinispan.util.logging.Log;
@@ -54,7 +54,7 @@
private static final Log log = LogFactory.getLog(CacheTestSupport.class);
- protected static CacheManager createTestCacheManager() {
+ protected static CacheContainer createTestCacheManager() {
return TestCacheManagerFactory.createClusteredCacheManager( createTestConfiguration() );
}
@@ -133,7 +133,7 @@
}
}
- public static CacheManager createLocalCacheManager() {
+ public static CacheContainer createLocalCacheManager() {
GlobalConfiguration globalConfiguration = GlobalConfiguration.getNonClusteredDefault();
Configuration cfg = new Configuration();
cfg.setCacheMode(CacheMode.LOCAL);
Modified: branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/InfinispanDirectoryStressTest.java
===================================================================
--- branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/InfinispanDirectoryStressTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/InfinispanDirectoryStressTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -35,7 +35,7 @@
import org.apache.lucene.search.TopDocs;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
import org.testng.annotations.Test;
@@ -57,8 +57,8 @@
public void testInfinispanDirectory() throws Exception {
final int OPERATIONS = 100;
- CacheManager cacheManager = CacheTestSupport.createTestCacheManager();
- Cache<CacheKey, Object> cache = cacheManager.getCache();
+ CacheContainer cacheContainer = CacheTestSupport.createTestCacheManager();
+ Cache<CacheKey, Object> cache = cacheContainer.getCache();
Directory directory = new InfinispanDirectory(cache, "indexName");
CacheTestSupport.initializeDirectory(directory);
File document = CacheTestSupport.createDummyDocToIndex("document.lucene", 10000);
@@ -76,7 +76,7 @@
assert OPERATIONS == hits.totalHits;
directory.close();
- cacheManager.stop();
+ cacheContainer.stop();
}
public void testDirectoryWithMultipleThreads() throws Exception {
Modified: branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/profiling/PerformanceCompareStressTest.java
===================================================================
--- branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/profiling/PerformanceCompareStressTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/profiling/PerformanceCompareStressTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -33,7 +33,7 @@
import org.infinispan.lucene.CacheTestSupport;
import org.infinispan.lucene.InfinispanDirectory;
import org.infinispan.lucene.testutils.ClusteredCacheFactory;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -75,13 +75,13 @@
@Test
public void profileInfinispanLocalDirectory() throws InterruptedException, IOException {
- CacheManager cacheManager = CacheTestSupport.createLocalCacheManager();
+ CacheContainer cacheContainer = CacheTestSupport.createLocalCacheManager();
try {
- Cache<CacheKey, Object> cache = cacheManager.getCache();
+ Cache<CacheKey, Object> cache = cacheContainer.getCache();
InfinispanDirectory dir = new InfinispanDirectory(cache, "iname");
testDirectory(dir, "InfinispanLocal");
} finally {
- cacheManager.stop();
+ cacheContainer.stop();
}
}
Modified: branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/testutils/ClusteredCacheFactory.java
===================================================================
--- branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/testutils/ClusteredCacheFactory.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/lucene-directory/src/test/java/org/infinispan/lucene/testutils/ClusteredCacheFactory.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -32,7 +32,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
import org.infinispan.lucene.CacheKey;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -108,8 +108,8 @@
while (true) {
try {
Configuration configuration = requests.take();
- CacheManager cacheManager = TestCacheManagerFactory.createClusteredCacheManager(configuration);
- Cache<CacheKey, Object> cache = cacheManager.getCache();
+ CacheContainer cacheContainer = TestCacheManagerFactory.createClusteredCacheManager(configuration);
+ Cache<CacheKey, Object> cache = cacheContainer.getCache();
results.put(cache);
} catch (InterruptedException e) {
return;
Modified: branches/4.1.x/pom.xml
===================================================================
--- branches/4.1.x/pom.xml 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/pom.xml 2010-06-11 08:32:26 UTC (rev 1902)
@@ -34,7 +34,7 @@
<module>server/core</module>
<module>server/memcached</module>
<module>server/hotrod</module>
- <module>server/websocket</module>
+<!-- <module>server/websocket</module> -->
<module>server/rest</module>
<module>client/hotrod-client</module>
<module>jopr-plugin</module>
Modified: branches/4.1.x/query/src/test/java/org/infinispan/query/backend/QueryHelperTest.java
===================================================================
--- branches/4.1.x/query/src/test/java/org/infinispan/query/backend/QueryHelperTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/query/src/test/java/org/infinispan/query/backend/QueryHelperTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -24,7 +24,7 @@
import org.infinispan.Cache;
import org.infinispan.CacheException;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.query.test.Person;
import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -45,7 +45,7 @@
@Test(groups = "unit")
public class QueryHelperTest {
Configuration cfg;
- List<CacheManager> cacheManagers;
+ List<CacheContainer> cacheContainers;
@BeforeMethod
public void setUp() {
@@ -53,17 +53,17 @@
cfg.setIndexingEnabled(true);
cfg.setIndexLocalOnly(true);
- cacheManagers = new LinkedList<CacheManager>();
+ cacheContainers = new LinkedList<CacheContainer>();
}
@AfterMethod
public void tearDown() {
- TestingUtil.killCacheManagers(cacheManagers);
+ TestingUtil.killCacheManagers(cacheContainers);
}
private Cache<?, ?> createCache(Configuration c) {
- CacheManager cm = TestCacheManagerFactory.createCacheManager(c);
- cacheManagers.add(cm);
+ CacheContainer cm = TestCacheManagerFactory.createCacheManager(c);
+ cacheContainers.add(cm);
return cm.getCache();
}
Modified: branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/KeyTypeTest.java
===================================================================
--- branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/KeyTypeTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/KeyTypeTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -25,7 +25,6 @@
import org.apache.lucene.search.TermQuery;
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.query.CacheQuery;
import org.infinispan.query.QueryFactory;
@@ -34,14 +33,10 @@
import org.infinispan.query.test.CustomKey;
import org.infinispan.query.test.Person;
import org.infinispan.test.SingleCacheManagerTest;
-import org.infinispan.test.TestingUtil;
import org.infinispan.test.fwk.TestCacheManagerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
-import java.util.Properties;
import static org.infinispan.config.Configuration.CacheMode.LOCAL;
Modified: branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/LocalCacheTest.java
===================================================================
--- branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/LocalCacheTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/query/src/test/java/org/infinispan/query/blackbox/LocalCacheTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -22,7 +22,6 @@
package org.infinispan.query.blackbox;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.query.helper.TestQueryHelperFactory;
import org.infinispan.query.test.Person;
Modified: branches/4.1.x/query/src/test/java/org/infinispan/query/config/QueryParsingTest.java
===================================================================
--- branches/4.1.x/query/src/test/java/org/infinispan/query/config/QueryParsingTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/query/src/test/java/org/infinispan/query/config/QueryParsingTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -25,7 +25,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.GlobalConfiguration;
import org.infinispan.config.InfinispanConfiguration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
import org.infinispan.test.AbstractInfinispanTest;
import org.infinispan.test.TestingUtil;
@@ -80,7 +80,7 @@
assert other.isIndexingEnabled();
assert other.isIndexLocalOnly();
- CacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(def);
+ CacheContainer cm = TestCacheManagerFactory.createClusteredCacheManager(def);
try {
Cache<Object, Object> cache = cm.getCache("test");
cache.stop();
Modified: branches/4.1.x/server/core/src/main/scala/org/infinispan/server/core/Main.scala
===================================================================
--- branches/4.1.x/server/core/src/main/scala/org/infinispan/server/core/Main.scala 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/core/src/main/scala/org/infinispan/server/core/Main.scala 2010-06-11 08:32:26 UTC (rev 1902)
@@ -9,7 +9,7 @@
import java.util.concurrent.{ThreadFactory, ExecutionException, Callable, Executors}
import gnu.getopt.{Getopt, LongOpt}
import org.infinispan.Version
-import org.infinispan.manager.{CacheManager, DefaultCacheManager}
+import org.infinispan.manager.{CacheContainer, DefaultCacheManager}
import java.util.Properties
/**
@@ -259,7 +259,7 @@
}
}
-private class ShutdownHook(server: ProtocolServer, cacheManager: CacheManager) extends Thread {
+private class ShutdownHook(server: ProtocolServer, cacheManager: CacheContainer) extends Thread {
override def run {
if (server != null) {
System.out.println("Posting Shutdown Request to the server...")
Modified: branches/4.1.x/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodIdleTimeoutTest.scala
===================================================================
--- branches/4.1.x/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodIdleTimeoutTest.scala 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodIdleTimeoutTest.scala 2010-06-11 08:32:26 UTC (rev 1902)
@@ -5,7 +5,7 @@
import test.HotRodTestingUtil._
import org.testng.Assert._
import test.{HotRodClient, UniquePortThreadLocal}
-import org.infinispan.manager.{EmbeddedCacheManager, CacheManager}
+import org.infinispan.manager.{EmbeddedCacheManager, CacheContainer}
/**
* // TODO: Document this
Modified: branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedDecoder.scala
===================================================================
--- branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedDecoder.scala 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedDecoder.scala 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.server.memcached
-import org.infinispan.manager.{CacheManager}
+import org.infinispan.manager.{CacheContainer}
import org.infinispan.server.core.Operation._
import org.infinispan.server.memcached.MemcachedOperation._
import org.infinispan.context.Flag
Modified: branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedServer.scala
===================================================================
--- branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedServer.scala 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedServer.scala 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.server.core.AbstractProtocolServer
import org.infinispan.server.core.transport.{Decoder, Encoder}
-import org.infinispan.manager.CacheManager
+import org.infinispan.manager.CacheContainer
import java.util.concurrent.{Executors, ScheduledExecutorService}
/**
Modified: branches/4.1.x/server/memcached/src/test/scala/org/infinispan/server/memcached/MemcachedFunctionalTest.scala
===================================================================
--- branches/4.1.x/server/memcached/src/test/scala/org/infinispan/server/memcached/MemcachedFunctionalTest.scala 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/memcached/src/test/scala/org/infinispan/server/memcached/MemcachedFunctionalTest.scala 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,6 +1,6 @@
package org.infinispan.server.memcached
-import org.infinispan.manager.CacheManager
+import org.infinispan.manager.CacheContainer
import java.lang.reflect.Method
import java.util.concurrent.TimeUnit
import org.testng.Assert._
Modified: branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServer.java
===================================================================
--- branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServer.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServer.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -34,7 +34,7 @@
import java.util.concurrent.Executors;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.core.AbstractProtocolServer;
import org.infinispan.server.websocket.handlers.GetHandler;
@@ -117,12 +117,12 @@
private static class WebSocketServerPipelineFactory implements ChannelPipelineFactory {
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
private Map<String, OpHandler> operationHandlers;
private Map<String, Cache> startedCaches = new ConcurrentHashMap<String, Cache>();
- public WebSocketServerPipelineFactory(CacheManager cacheManager) {
- this.cacheManager = cacheManager;
+ public WebSocketServerPipelineFactory(CacheContainer cacheContainer) {
+ this.cacheContainer = cacheContainer;
operationHandlers = new HashMap<String, OpHandler>();
operationHandlers.put("put", new PutHandler());
@@ -140,7 +140,7 @@
pipeline.addLast("decoder", new HttpRequestDecoder());
pipeline.addLast("aggregator", new HttpChunkAggregator(65536));
pipeline.addLast("encoder", new HttpResponseEncoder());
- pipeline.addLast("handler", new WebSocketServerHandler(cacheManager, operationHandlers, startedCaches));
+ pipeline.addLast("handler", new WebSocketServerHandler(cacheContainer, operationHandlers, startedCaches));
return pipeline;
}
Modified: branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServerHandler.java
===================================================================
--- branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServerHandler.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/websocket/src/main/java/org/infinispan/server/websocket/WebSocketServerHandler.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -32,7 +32,7 @@
import java.util.Map;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.ChannelFuture;
@@ -64,13 +64,13 @@
public class WebSocketServerHandler extends SimpleChannelUpstreamHandler {
private static final String INFINISPAN_WS_JS_FILENAME = "infinispan-ws.js";
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
private Map<String, OpHandler> operationHandlers;
private boolean connectionUpgraded;
private Map<String, Cache> startedCaches;
- public WebSocketServerHandler(CacheManager cacheManager, Map<String, OpHandler> operationHandlers, Map<String, Cache> startedCaches) {
- this.cacheManager = cacheManager;
+ public WebSocketServerHandler(CacheContainer cacheContainer, Map<String, OpHandler> operationHandlers, Map<String, Cache> startedCaches) {
+ this.cacheContainer = cacheContainer;
this.operationHandlers = operationHandlers;
this.startedCaches = startedCaches;
}
@@ -160,9 +160,9 @@
cache = startedCaches.get(key);
if(cache == null) {
if(cacheName != null) {
- cache = cacheManager.getCache(key);
+ cache = cacheContainer.getCache(key);
} else {
- cache = cacheManager.getCache();
+ cache = cacheContainer.getCache();
}
startedCaches.put(key, cache);
cache.start();
Modified: branches/4.1.x/server/websocket/src/test/java/org/infinispan/server/websocket/handlers/MockClient.java
===================================================================
--- branches/4.1.x/server/websocket/src/test/java/org/infinispan/server/websocket/handlers/MockClient.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/server/websocket/src/test/java/org/infinispan/server/websocket/handlers/MockClient.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -22,7 +22,7 @@
package org.infinispan.server.websocket.handlers;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.server.websocket.OpHandler;
import org.infinispan.websocket.MockChannel;
@@ -37,7 +37,7 @@
public class MockClient {
private String cacheName;
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
private Cache<Object, Object> cache;
private OpHandler putHandler = new PutHandler();
@@ -50,8 +50,8 @@
this.cacheName = cacheName;
this.ctx = new MockChannelHandlerContext(mockChannel);
- cacheManager = new DefaultCacheManager();
- cache = cacheManager.getCache(cacheName);
+ cacheContainer = new DefaultCacheManager();
+ cache = cacheContainer.getCache(cacheName);
}
public void put(String key, String value) {
Modified: branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/NodeAPITest.java
===================================================================
--- branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/NodeAPITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/NodeAPITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -1,7 +1,6 @@
package org.infinispan.api.tree;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
@@ -11,8 +10,7 @@
import org.infinispan.tree.TreeCache;
import org.infinispan.tree.TreeCacheImpl;
import static org.testng.AssertJUnit.*;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
+
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
Modified: branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/TreeCacheAPITest.java
===================================================================
--- branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/TreeCacheAPITest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/tree/src/test/java/org/infinispan/api/tree/TreeCacheAPITest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -4,7 +4,6 @@
import org.infinispan.atomic.AtomicMap;
import org.infinispan.atomic.AtomicMapLookup;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.TestingUtil;
@@ -18,8 +17,7 @@
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
import static org.testng.AssertJUnit.*;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
+
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
Modified: branches/4.1.x/tree/src/test/java/org/infinispan/profiling/TreeProfileTest.java
===================================================================
--- branches/4.1.x/tree/src/test/java/org/infinispan/profiling/TreeProfileTest.java 2010-06-11 07:46:07 UTC (rev 1901)
+++ branches/4.1.x/tree/src/test/java/org/infinispan/profiling/TreeProfileTest.java 2010-06-11 08:32:26 UTC (rev 1902)
@@ -2,7 +2,7 @@
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.profiling.testinternals.FqnGenerator;
import org.infinispan.profiling.testinternals.Generator;
import org.infinispan.profiling.testinternals.TaskRunner;
@@ -52,7 +52,7 @@
protected static final int WARMUP_LOOPS = 20000;
protected static final boolean USE_SLEEP = false; // throttle generation a bit
- private CacheManager cacheManager;
+ private CacheContainer cacheContainer;
protected TreeCache cache;
@@ -66,15 +66,15 @@
cfg.setConcurrencyLevel(2000);
cfg.setLockAcquisitionTimeout(120000);
cfg.setIsolationLevel(IsolationLevel.READ_COMMITTED);
- cacheManager = TestCacheManagerFactory.createCacheManager(cfg);
- Cache c = cacheManager.getCache();
+ cacheContainer = TestCacheManagerFactory.createCacheManager(cfg);
+ Cache c = cacheContainer.getCache();
cache = new TreeCacheImpl(c);
}
@AfterMethod
public void tearDown() {
TreeTestingUtil.killTreeCaches(cache);
- TestingUtil.killCacheManagers(cacheManager);
+ TestingUtil.killCacheManagers(cacheContainer);
}
More information about the infinispan-commits
mailing list