[jbosscache-commits] JBoss Cache SVN: r7514 - in core/branches/flat/src: main/java/org/horizon/commands/write and 11 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Mon Jan 19 14:07:48 EST 2009
Author: manik.surtani at jboss.com
Date: 2009-01-19 14:07:48 -0500 (Mon, 19 Jan 2009)
New Revision: 7514
Added:
core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/SuspectException.java
Removed:
core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java
Modified:
core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java
core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java
core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java
core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java
core/branches/flat/src/test/java/org/horizon/atomic/APITest.java
core/branches/flat/src/test/java/org/horizon/manager/CacheManagerComponentRegistryTest.java
core/branches/flat/src/test/java/org/horizon/manager/CacheManagerTest.java
core/branches/flat/src/test/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java
core/branches/flat/src/test/java/org/horizon/profiling/MemConsumptionTest.java
core/branches/flat/src/test/resources/log4j.xml
Log:
Modified: core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -26,7 +26,7 @@
import org.horizon.context.InvocationContext;
import org.horizon.logging.Log;
import org.horizon.logging.LogFactory;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
* // TODO: MANIK: Document this
@@ -38,9 +38,9 @@
public static final byte METHOD_ID = 26;
private static final Log log = LogFactory.getLog(GetKeyValueCommand.class);
private static final boolean trace = log.isTraceEnabled();
- private Notifier notifier;
+ private CacheNotifier notifier;
- public GetKeyValueCommand(Object key, Notifier notifier) {
+ public GetKeyValueCommand(Object key, CacheNotifier notifier) {
this.key = key;
this.notifier = notifier;
}
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -25,7 +25,7 @@
import org.horizon.commands.read.AbstractDataCommand;
import org.horizon.container.MVCCEntry;
import org.horizon.context.InvocationContext;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
* @author Mircea.Markus at jboss.com
@@ -34,13 +34,13 @@
public class EvictCommand extends AbstractDataCommand {
public static final byte METHOD_ID = 120;
- private Notifier notifier;
+ private CacheNotifier notifier;
public EvictCommand(Object key) {
this.key = key;
}
- public void initialize(Notifier notifier) {
+ public void initialize(CacheNotifier notifier) {
this.notifier = notifier;
}
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -28,7 +28,7 @@
import org.horizon.context.InvocationContext;
import org.horizon.logging.Log;
import org.horizon.logging.LogFactory;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
import org.horizon.tree.Fqn;
@@ -46,7 +46,7 @@
/* dependencies*/
protected CacheSPI spi;
- protected Notifier notifier;
+ protected CacheNotifier notifier;
protected DataContainer dataContainer;
public InvalidateCommand(Object key) {
@@ -56,7 +56,7 @@
public InvalidateCommand() {
}
- public void initialize(CacheSPI cacheSpi, DataContainer dataContainer, Notifier notifier) {
+ public void initialize(CacheSPI cacheSpi, DataContainer dataContainer, CacheNotifier notifier) {
this.spi = cacheSpi;
this.dataContainer = dataContainer;
this.notifier = notifier;
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -27,7 +27,7 @@
import org.horizon.commands.read.AbstractDataCommand;
import org.horizon.container.MVCCEntry;
import org.horizon.context.InvocationContext;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
* Implements functionality defined by {@link org.horizon.Cache#put(Object, Object)}
@@ -40,16 +40,16 @@
protected Object value;
protected boolean putIfAbsent;
- private Notifier notifier;
+ private CacheNotifier notifier;
- public PutKeyValueCommand(Object key, Object value, boolean putIfAbsent, Notifier notifier) {
+ public PutKeyValueCommand(Object key, Object value, boolean putIfAbsent, CacheNotifier notifier) {
super(key);
this.value = value;
this.putIfAbsent = putIfAbsent;
this.notifier = notifier;
}
- public void init(Notifier notifier) {
+ public void init(CacheNotifier notifier) {
this.notifier = notifier;
}
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -25,7 +25,7 @@
import org.horizon.commands.Visitor;
import org.horizon.container.MVCCEntry;
import org.horizon.context.InvocationContext;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
import java.util.Map;
import java.util.Map.Entry;
@@ -38,14 +38,14 @@
public static final byte METHOD_ID = 121;
private Map<Object, Object> map;
- private Notifier notifier;
+ private CacheNotifier notifier;
- public PutMapCommand(Map map, Notifier notifier) {
+ public PutMapCommand(Map map, CacheNotifier notifier) {
this.map = map;
this.notifier = notifier;
}
- public void init(Notifier notifier) {
+ public void init(CacheNotifier notifier) {
this.notifier = notifier;
}
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -25,7 +25,7 @@
import org.horizon.commands.read.AbstractDataCommand;
import org.horizon.container.MVCCEntry;
import org.horizon.context.InvocationContext;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
@@ -34,17 +34,17 @@
*/
public class RemoveCommand extends AbstractDataCommand {
public static final byte METHOD_ID = 6;
- private Notifier notifier;
+ private CacheNotifier notifier;
protected Object value;
- public RemoveCommand(Object key, Object value, Notifier notifier) {
+ public RemoveCommand(Object key, Object value, CacheNotifier notifier) {
super(key);
this.value = value;
this.notifier = notifier;
}
- public void init(Notifier notifier) {
+ public void init(CacheNotifier notifier) {
this.notifier = notifier;
}
Modified: core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -32,7 +32,7 @@
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @see Configuration
- * @see org.horizon.manager.CacheManager
+ * @see org.horizon.manager.DefaultCacheManager
* @since 1.0
*/
public class ConfigurationException extends CacheException {
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -45,7 +45,7 @@
* GlobalConfiguration would also have a reference to the template default configuration, accessible via {@link
* org.horizon.config.GlobalConfiguration#getDefaultConfiguration()}
* <p/>
- * This is typically used to configure a {@link org.horizon.manager.CacheManager}
+ * This is typically used to configure a {@link org.horizon.manager.DefaultCacheManager}
*
* @return a GlobalConfiguration as parsed from the configuration file.
*/
Modified: core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -35,7 +35,7 @@
import org.horizon.lock.TimeoutException;
import org.horizon.logging.Log;
import org.horizon.logging.LogFactory;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
* // TODO: MANIK: Document this
@@ -51,13 +51,13 @@
LockManager lockManager;
Configuration configuration;
long defaultLockAcquisitionTimeout;
- Notifier notifier;
+ CacheNotifier notifier;
private static final Log log = LogFactory.getLog(EntryFactoryImpl.class);
private static final boolean trace = log.isTraceEnabled();
@Inject
- public void injectDependencies(DataContainer dataContainer, LockManager lockManager, Configuration configuration, Notifier notifier) {
+ public void injectDependencies(DataContainer dataContainer, LockManager lockManager, Configuration configuration, CacheNotifier notifier) {
this.container = dataContainer;
this.configuration = configuration;
this.lockManager = lockManager;
Modified: core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -10,8 +10,8 @@
*/
public enum Scopes {
/**
- * Components bounded to this scope can only be created by a {@link org.horizon.manager.CacheManager} and exist in
- * the {@link org.horizon.manager.CacheManager}'s {@link org.horizon.factories.ComponentRegistry}.
+ * Components bounded to this scope can only be created by a {@link org.horizon.manager.DefaultCacheManager} and exist in
+ * the {@link org.horizon.manager.DefaultCacheManager}'s {@link org.horizon.factories.ComponentRegistry}.
*/
GLOBAL,
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -36,7 +36,7 @@
import org.horizon.interceptors.base.JmxStatsCommandInterceptor;
import org.horizon.loader.CacheLoader;
import org.horizon.loader.CacheLoaderManager;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
import org.horizon.transaction.TransactionTable;
import java.util.HashMap;
@@ -56,7 +56,7 @@
protected TransactionTable txTable = null;
protected CacheLoader<Object, Object> loader;
protected DataContainer<Object, Object> dataContainer;
- protected Notifier notifier;
+ protected CacheNotifier notifier;
protected EntryFactory entryFactory;
protected boolean isActivation = false;
@@ -71,7 +71,7 @@
@Inject
protected void injectDependencies(TransactionTable txTable, CacheLoaderManager clm,
- DataContainer<Object, Object> dataContainer, EntryFactory entryFactory, Notifier notifier) {
+ DataContainer<Object, Object> dataContainer, EntryFactory entryFactory, CacheNotifier notifier) {
this.txTable = txTable;
this.clm = clm;
// CacheMode mode = configuration.getCacheMode();
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -26,7 +26,7 @@
import org.horizon.commands.tx.RollbackCommand;
import org.horizon.context.InvocationContext;
import org.horizon.factories.annotations.Inject;
-import org.horizon.notifications.Notifier;
+import org.horizon.notifications.CacheNotifier;
/**
* The interceptor in charge of firing off notifications to cache listeners
@@ -35,10 +35,10 @@
* @since 1.0
*/
public class NotificationInterceptor extends BaseTransactionalContextInterceptor {
- private Notifier notifier;
+ private CacheNotifier notifier;
@Inject
- public void injectDependencies(Notifier notifier) {
+ public void injectDependencies(CacheNotifier notifier) {
this.notifier = notifier;
}
Deleted: core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.horizon.remoting;
-
-import org.horizon.CacheException;
-
-/**
- * Thrown when a member is suspected during remote method invocation
- *
- * @author Bela Ban
- * @since 1.0
- */
-public class SuspectException extends CacheException {
-
- private static final long serialVersionUID = -2965599037371850141L;
-
- public SuspectException() {
- super();
- }
-
- public SuspectException(String msg) {
- super(msg);
- }
-
- public SuspectException(String msg, Throwable cause) {
- super(msg, cause);
- }
-}
Copied: core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/SuspectException.java (from rev 7505, core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/SuspectException.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/SuspectException.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon.remoting.transport.jgroups;
+
+import org.horizon.CacheException;
+
+/**
+ * Thrown when a member is suspected during remote method invocation
+ *
+ * @author Bela Ban
+ * @since 1.0
+ */
+public class SuspectException extends CacheException {
+
+ private static final long serialVersionUID = -2965599037371850141L;
+
+ public SuspectException() {
+ super();
+ }
+
+ public SuspectException(String msg) {
+ super(msg);
+ }
+
+ public SuspectException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/SuspectException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/test/java/org/horizon/atomic/APITest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/atomic/APITest.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/java/org/horizon/atomic/APITest.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -23,7 +23,7 @@
import org.horizon.config.Configuration;
import org.horizon.config.Configuration.CacheMode;
-import org.horizon.manager.CacheManager;
+import org.horizon.manager.DefaultCacheManager;
import org.horizon.transaction.DummyTransactionManager;
import org.horizon.transaction.DummyTransactionManagerLookup;
import org.horizon.util.TestingUtil;
@@ -48,7 +48,7 @@
public void testAtomicMap() {
Configuration c = new Configuration();
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
AtomicMap map = cache.getAtomicMap("map");
@@ -75,7 +75,7 @@
Configuration c = new Configuration();
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
AtomicMap map = cache.getAtomicMap("map");
@@ -113,7 +113,7 @@
Configuration c = new Configuration();
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
AtomicMap map = cache.getAtomicMap("map");
@@ -148,7 +148,7 @@
Configuration c = new Configuration();
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
AtomicMap map = cache.getAtomicMap("map");
@@ -178,8 +178,8 @@
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setCacheMode(CacheMode.REPL_SYNC);
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache1 = (AtomicMapCache) new CacheManager(c).getCache();
- AtomicMapCache cache2 = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache1 = (AtomicMapCache) new DefaultCacheManager(c).getCache();
+ AtomicMapCache cache2 = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
TestingUtil.blockUntilViewsReceived(20000, cache1, cache2);
@@ -210,8 +210,8 @@
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setCacheMode(CacheMode.REPL_SYNC);
c.setInvocationBatchingEnabled(true);
- AtomicMapCache cache1 = (AtomicMapCache) new CacheManager(c).getCache();
- AtomicMapCache cache2 = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache1 = (AtomicMapCache) new DefaultCacheManager(c).getCache();
+ AtomicMapCache cache2 = (AtomicMapCache) new DefaultCacheManager(c).getCache();
try {
TestingUtil.blockUntilViewsReceived(20000, cache1, cache2);
Modified: core/branches/flat/src/test/java/org/horizon/manager/CacheManagerComponentRegistryTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/manager/CacheManagerComponentRegistryTest.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/java/org/horizon/manager/CacheManagerComponentRegistryTest.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -22,7 +22,7 @@
*/
@Test(groups = "functional", sequential = true)
public class CacheManagerComponentRegistryTest {
- CacheManager cm;
+ DefaultCacheManager cm;
@AfterMethod
public void tearDown() {
@@ -33,7 +33,7 @@
Configuration defaultCfg = new Configuration();
defaultCfg.setCacheMode(Configuration.CacheMode.REPL_SYNC);
// cache manager with default configuration
- cm = new CacheManager(defaultCfg);
+ cm = new DefaultCacheManager(defaultCfg);
// default cache with no overrides
Cache c = cm.getCache();
@@ -63,7 +63,7 @@
defaultCfg.setCacheMode(Configuration.CacheMode.REPL_SYNC);
defaultCfg.setCacheLoaderConfig(clc);
// cache manager with default configuration
- cm = new CacheManager(defaultCfg);
+ cm = new DefaultCacheManager(defaultCfg);
// default cache with no overrides
Cache c = cm.getCache();
@@ -81,7 +81,7 @@
public void testOverridingComponents() throws CacheNameExistsException, NamedCacheNotFoundException {
Configuration defaultCfg = new Configuration();
- cm = new CacheManager(defaultCfg);
+ cm = new DefaultCacheManager(defaultCfg);
// default cache with no overrides
Cache c = cm.getCache();
Modified: core/branches/flat/src/test/java/org/horizon/manager/CacheManagerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/manager/CacheManagerTest.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/java/org/horizon/manager/CacheManagerTest.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -12,13 +12,13 @@
@Test(groups = "functional")
public class CacheManagerTest {
public void testDefaultCache() throws CacheNameExistsException {
- CacheManager cm = new CacheManager();
+ DefaultCacheManager cm = new DefaultCacheManager();
assert cm.getCache().getCacheStatus() == CacheStatus.STARTED;
- assert cm.getCache().getName().equals(CacheManager.DEFAULT_CACHE_NAME);
+ assert cm.getCache().getName().equals(DefaultCacheManager.DEFAULT_CACHE_NAME);
try {
- cm.defineCache(CacheManager.DEFAULT_CACHE_NAME, new Configuration());
+ cm.defineCache(DefaultCacheManager.DEFAULT_CACHE_NAME, new Configuration());
assert false : "Should fail";
}
catch (IllegalArgumentException e) {
@@ -28,7 +28,7 @@
}
public void testClashingNames() throws CacheNameExistsException {
- CacheManager cm = new CacheManager();
+ DefaultCacheManager cm = new DefaultCacheManager();
Configuration c = new Configuration();
cm.defineCache("aCache", c);
@@ -43,7 +43,7 @@
}
public void testStartAndStop() {
- CacheManager cm = new CacheManager();
+ DefaultCacheManager cm = new DefaultCacheManager();
Cache c1 = cm.getCache("cache1");
Cache c2 = cm.getCache("cache2");
Cache c3 = cm.getCache("cache3");
Modified: core/branches/flat/src/test/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -15,7 +15,7 @@
*/
@Test(groups = "functional", sequential = true)
public class CacheManagerXmlConfigurationTest {
- CacheManager cm;
+ DefaultCacheManager cm;
@AfterMethod
public void tearDown() {
@@ -54,7 +54,7 @@
"</jbosscache>";
ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
- cm = new CacheManager(bais);
+ cm = new DefaultCacheManager(bais);
// test default cache
Cache c = cm.getCache();
@@ -109,7 +109,7 @@
ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
try {
- cm = new CacheManager(bais);
+ cm = new DefaultCacheManager(bais);
assert false : "Should fail";
}
catch (ConfigurationException expected) {
@@ -132,7 +132,7 @@
"</jbosscache>";
ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
- cm = new CacheManager(bais);
+ cm = new DefaultCacheManager(bais);
assert cm.getCache() != null;
assert cm.getCache("c1") != null;
Modified: core/branches/flat/src/test/java/org/horizon/profiling/MemConsumptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/profiling/MemConsumptionTest.java 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/java/org/horizon/profiling/MemConsumptionTest.java 2009-01-19 19:07:48 UTC (rev 7514)
@@ -23,7 +23,7 @@
import org.horizon.Cache;
import org.horizon.CacheException;
-import org.horizon.manager.CacheManager;
+import org.horizon.manager.DefaultCacheManager;
import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
@@ -52,7 +52,7 @@
int kBytesCached = (bytesPerCharacter * numEntries * (payloadSize + keySize)) / 1024;
System.out.println("Bytes to be cached: " + NumberFormat.getIntegerInstance().format(kBytesCached) + " kb");
- Cache c = new CacheManager().getCache();
+ Cache c = new DefaultCacheManager().getCache();
for (int i = 0; i < numEntries; i++) {
switch (payloadType) {
case STRINGS:
Modified: core/branches/flat/src/test/resources/log4j.xml
===================================================================
--- core/branches/flat/src/test/resources/log4j.xml 2009-01-19 19:02:51 UTC (rev 7513)
+++ core/branches/flat/src/test/resources/log4j.xml 2009-01-19 19:07:48 UTC (rev 7514)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!--
@@ -10,7 +11,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="../jbosscache.log"/>
- <param name="Append" value="true"/>
+ <param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
@@ -18,7 +19,7 @@
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
- <param name="Threshold" value="DEBUG"/>
+ <param name="Threshold" value="TRACE"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -46,15 +47,23 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="TRACE"/>
+ <priority value="WARN"/>
</category>
- <category name="org.jboss.starobrno.factories.ComponentRegistry">
+ <category name="org.jboss.starobrno">
<priority value="WARN"/>
</category>
+ <category name="org.horizon.profiling">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.horizon.factories">
+ <priority value="WARN"/>
+ </category>
+
<category name="org.jboss.cache.factories">
- <priority value="TRACE"/>
+ <priority value="WARN"/>
</category>
<category name="org.jboss.tm">
More information about the jbosscache-commits
mailing list