Author: nfilotto
Date: 2010-02-09 08:44:35 -0500 (Tue, 09 Feb 2010)
New Revision: 1737
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/ControllerCacheLoader.java
Removed:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml
Log:
EXOJCR-467: Use a decorator on the top of configured cache loaded used for the JCR locks
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-09
08:54:21 UTC (rev 1736)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-09
13:44:35 UTC (rev 1737)
@@ -55,11 +55,13 @@
import org.exoplatform.services.naming.InitialContextInitializer;
import org.exoplatform.services.transaction.TransactionService;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.lock.TimeoutException;
import org.picocontainer.Startable;
@@ -246,9 +248,9 @@
cache = factory.createCache(config.getLockManager());
+ cache.create();
// Add the cache loader needed to prevent TimeoutException
- addCacheLoaders();
- cache.create();
+ addCacheLoader();
cache.start();
createStructuredNode(lockRoot);
@@ -348,7 +350,7 @@
* This methods adds programmatically the required {@link CacheLoader} needed to
prevent
* any {@link TimeoutException}
*/
- private void addCacheLoaders()
+ private void addCacheLoader()
{
CacheLoaderConfig config = cache.getConfiguration().getCacheLoaderConfig();
List<IndividualCacheLoaderConfig> oldConfigs;
@@ -356,37 +358,39 @@
{
if (log.isInfoEnabled())
{
- log.info("No cache loader has been defined, thus no pre and post cache
loader will be added");
+ log.info("No cache loader has been defined, thus no need to encapsulate
any cache loader.");
}
return;
}
- PreNPostCacheLoader preCL = new PreNPostCacheLoader(true);
+ CacheLoaderManager clm = ((CacheSPI<Serializable,
Object>)cache).getComponentRegistry().getComponent(CacheLoaderManager.class);
+ if (clm == null)
+ {
+ log.error("The CacheLoaderManager cannot be found");
+ }
+ CacheLoader currentCL = clm.getCacheLoader();
+ if (currentCL == null)
+ {
+ log.error("The CacheLoader cannot be found");
+ }
+
+ ControllerCacheLoader ccl = new ControllerCacheLoader(currentCL);
+ List<IndividualCacheLoaderConfig> newConfig = new
ArrayList<IndividualCacheLoaderConfig>(1);
// create CacheLoaderConfig
- IndividualCacheLoaderConfig preCLConfig = new IndividualCacheLoaderConfig();
+ IndividualCacheLoaderConfig cclConfig = new IndividualCacheLoaderConfig();
// set CacheLoader
- preCLConfig.setCacheLoader(preCL);
+ cclConfig.setCacheLoader(ccl);
// set parameters
- preCLConfig.setFetchPersistentState(false);
- preCLConfig.setAsync(false);
- preCLConfig.setIgnoreModifications(true);
- preCLConfig.setPurgeOnStartup(false);
- PreNPostCacheLoader postCL = new PreNPostCacheLoader(false);
- // create CacheLoaderConfig
- IndividualCacheLoaderConfig postCLConfig = new IndividualCacheLoaderConfig();
- // set CacheLoader
- postCLConfig.setCacheLoader(postCL);
- // set parameters
- postCLConfig.setFetchPersistentState(false);
- postCLConfig.setAsync(false);
- postCLConfig.setIgnoreModifications(true);
- postCLConfig.setPurgeOnStartup(false);
- List<IndividualCacheLoaderConfig> newConfigs = new
ArrayList<IndividualCacheLoaderConfig>(oldConfigs);
- newConfigs.add(0, preCLConfig);
- newConfigs.add(postCLConfig);
- config.setIndividualCacheLoaderConfigs(newConfigs);
+ cclConfig.setFetchPersistentState(clm.isFetchPersistentState());
+ cclConfig.setAsync(false);
+ cclConfig.setIgnoreModifications(false);
+ CacheLoaderConfig.IndividualCacheLoaderConfig first =
config.getFirstCacheLoaderConfig();
+ cclConfig.setPurgeOnStartup(first != null && first.isPurgeOnStartup());
+ newConfig.add(cclConfig);
+ config.setIndividualCacheLoaderConfigs(newConfig);
+
if (log.isInfoEnabled())
{
- log.info("The pre and post cache loaders have been added");
+ log.info("The configured cache loader has been encapsulated
successfully");
}
}
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/ControllerCacheLoader.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/ControllerCacheLoader.java
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/ControllerCacheLoader.java 2010-02-09
13:44:35 UTC (rev 1737)
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
+
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.CacheStatus;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.Modification;
+import org.jboss.cache.NodeSPI;
+import org.jboss.cache.RegionManager;
+import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.lock.TimeoutException;
+
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * This {@link CacheLoader} is used to encapsulate the {@link CacheLoader} used to
persist the data of the Locks.
+ * This is used to prevent {@link TimeoutException} that occur when several threads try
to access the same data
+ * at the same time and the data is missing in the local cache which is the case most of
the time, since no data
+ * means that the node is not locked. Since all the lock data will be loaded at startup,
this {@link CacheLoader}
+ * will only call the nested {@link CacheLoader} for read operations when the cache
status is CacheStatus.STARTING,
+ * for all other status, we don't call the nested cache loader since if no data cans
be found in the local cache,
+ * it means that there is no data to load because all the lock data has been loaded at
startup.
+ *
+ * Created by The eXo Platform SAS
+ * Author : Nicolas Filotto
+ * nicolas.filotto(a)exoplatform.com
+ * 9 f�vr. 2010
+ */
+@SuppressWarnings("unchecked")
+public class ControllerCacheLoader implements CacheLoader
+{
+ /**
+ * The nested cache loader
+ */
+ private final CacheLoader cl;
+
+ /**
+ * The related cache
+ */
+ private CacheSPI cache;
+
+ /**
+ * The configuration of the current cache loader
+ */
+ private IndividualCacheLoaderConfig config;
+
+ /**
+ * The default constructor
+ * @param cl the cache loader that will be managed by the controller
+ */
+ public ControllerCacheLoader(CacheLoader cl)
+ {
+ this.cl = cl;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#commit(java.lang.Object)
+ */
+ public void commit(Object tx) throws Exception
+ {
+ cl.commit(tx);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#exists(org.jboss.cache.Fqn)
+ */
+ public boolean exists(Fqn name) throws Exception
+ {
+ if (cache.getCacheStatus() == CacheStatus.STARTING)
+ {
+ // Before calling the nested cache loader we first check if the data exists in
the local cache
+ // in order to prevent multiple call to the cache store
+ NodeSPI<?, ?> node = cache.peek(name, false);
+ if (node != null)
+ {
+ // The node already exists in the local cache, so we return true
+ return true;
+ }
+ else
+ {
+ // The node doesn't exist in the local cache, so we need to check through
the nested
+ // cache loader
+ return cl.exists(name);
+ }
+ }
+ // All the data is loaded at startup, so no need to call the nested cache loader
for another
+ // cache status other than CacheStatus.STARTING
+ return false;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#get(org.jboss.cache.Fqn)
+ */
+ public Map<Object, Object> get(Fqn name) throws Exception
+ {
+ if (cache.getCacheStatus() == CacheStatus.STARTING)
+ {
+ // Before calling the nested cache loader we first check if the data exists in
the local cache
+ // in order to prevent multiple call to the cache store
+ NodeSPI node = cache.peek(name, false);
+ if (node != null)
+ {
+ // The node already exists in the local cache, so we return the corresponding
data
+ return node.getDataDirect();
+ }
+ else
+ {
+ // The node doesn't exist in the local cache, so we need to check through
the nested
+ // cache loader
+ return cl.get(name);
+ }
+ }
+ // All the data is loaded at startup, so no need to call the nested cache loader
for another
+ // cache status other than CacheStatus.STARTING
+ return null;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#getChildrenNames(org.jboss.cache.Fqn)
+ */
+ public Set<?> getChildrenNames(Fqn fqn) throws Exception
+ {
+ if (cache.getCacheStatus() == CacheStatus.STARTING)
+ {
+ // Try to get the list of children name from the nested cache loader
+ return cl.getChildrenNames(fqn);
+ }
+ // All the data is loaded at startup, so no need to call the nested cache loader
for another
+ // cache status other than CacheStatus.STARTING
+ return null;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#getConfig()
+ */
+ public IndividualCacheLoaderConfig getConfig()
+ {
+ return config;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#loadEntireState(java.io.ObjectOutputStream)
+ */
+ public void loadEntireState(ObjectOutputStream os) throws Exception
+ {
+ cl.loadEntireState(os);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#loadState(org.jboss.cache.Fqn,
java.io.ObjectOutputStream)
+ */
+ public void loadState(Fqn subtree, ObjectOutputStream os) throws Exception
+ {
+ cl.loadState(subtree, os);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#prepare(java.lang.Object, java.util.List,
boolean)
+ */
+ public void prepare(Object tx, List<Modification> modifications, boolean
onePhase) throws Exception
+ {
+ cl.prepare(tx, modifications, onePhase);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(java.util.List)
+ */
+ public void put(List<Modification> modifications) throws Exception
+ {
+ cl.put(modifications);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
+ */
+ public void put(Fqn name, Map<Object, Object> attributes) throws Exception
+ {
+ cl.put(name, attributes);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.lang.Object,
java.lang.Object)
+ */
+ public Object put(Fqn name, Object key, Object value) throws Exception
+ {
+ return cl.put(name, key, value);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn)
+ */
+ public void remove(Fqn fqn) throws Exception
+ {
+ cl.remove(fqn);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn,
java.lang.Object)
+ */
+ public Object remove(Fqn fqn, Object key) throws Exception
+ {
+ return cl.remove(fqn, key);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#removeData(org.jboss.cache.Fqn)
+ */
+ public void removeData(Fqn fqn) throws Exception
+ {
+ cl.removeData(fqn);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#rollback(java.lang.Object)
+ */
+ public void rollback(Object tx)
+ {
+ cl.rollback(tx);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#setCache(org.jboss.cache.CacheSPI)
+ */
+ public void setCache(CacheSPI c)
+ {
+ cl.setCache(c);
+ this.cache = c;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig)
+ */
+ public void setConfig(IndividualCacheLoaderConfig config)
+ {
+ this.config = config;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#setRegionManager(org.jboss.cache.RegionManager)
+ */
+ public void setRegionManager(RegionManager manager)
+ {
+ cl.setRegionManager(manager);
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#storeEntireState(java.io.ObjectInputStream)
+ */
+ public void storeEntireState(ObjectInputStream is) throws Exception
+ {
+ cl.storeEntireState(is);
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#storeState(org.jboss.cache.Fqn,
java.io.ObjectInputStream)
+ */
+ public void storeState(Fqn subtree, ObjectInputStream is) throws Exception
+ {
+ cl.storeState(subtree, is);
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#create()
+ */
+ public void create() throws Exception
+ {
+ cl.create();
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#destroy()
+ */
+ public void destroy()
+ {
+ cl.destroy();
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#start()
+ */
+ public void start() throws Exception
+ {
+ cl.start();
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#stop()
+ */
+ public void stop()
+ {
+ cl.stop();
+ }
+
+}
Deleted:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java 2010-02-09
08:54:21 UTC (rev 1736)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java 2010-02-09
13:44:35 UTC (rev 1737)
@@ -1,287 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not,
see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-
-import org.jboss.cache.CacheSPI;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Modification;
-import org.jboss.cache.NodeSPI;
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.cache.loader.CacheLoader;
-import org.jboss.cache.lock.TimeoutException;
-
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * This {@link CacheLoader} is used to encapsulate the {@link CacheLoader} used to
persist the data of the Locks.
- * This is used to prevent {@link TimeoutException} that occur when several threads try
to access the same data
- * at the same time and the data is missing in the local cache which is the case most of
the time, since no data
- * means that the node is not locked. This {@link CacheLoader} will then check if some
data exists before calling
- * the main {@link CacheLoader} that is used to persist the data and if no data exist
either in the local cache and
- * the main {@link CacheLoader}, this {@link CacheLoader} will load dummy data to
indicate that the data has already
- * been loaded.
- *
- * Created by The eXo Platform SAS
- * Author : Nicolas Filotto
- * nicolas.filotto(a)exoplatform.com
- * 4 f�vr. 2010
- */
-@SuppressWarnings("unchecked")
-public class PreNPostCacheLoader implements CacheLoader
-{
- /**
- * The configuration of the current cache loader
- */
- private IndividualCacheLoaderConfig config;
-
- /**
- * Indicates if this cache loader is called before the main cache loader of after the
main cache loader
- */
- private boolean preCacheLoader;
-
- /**
- * The related cache
- */
- private CacheSPI cache;
-
- /**
- * The default constructor
- * @param preCacheLoader indicates if this cache loader must be added before the main
cache loader or after it.
- * <code>true</code> means that it has been added before the main cache
loader.
- */
- public PreNPostCacheLoader(boolean preCacheLoader)
- {
- this.preCacheLoader = preCacheLoader;
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#commit(java.lang.Object)
- */
- public void commit(Object tx) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#exists(org.jboss.cache.Fqn)
- */
- public boolean exists(Fqn name) throws Exception
- {
- if (preCacheLoader)
- {
- // Before calling the main cache loader we first check if the data exists in the
local cache
- // in order to prevent multiple call to the cache store
- return cache.peek(name, false) != null;
- }
- else
- {
- // The main cache loader has been called but no data could find into the cache
store
- // so to prevent a multiple useless call, we return an empty map to enforce JBC
to create
- // a node that will indicate that the data has already been loaded but no data
was found
- return true;
- }
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#get(org.jboss.cache.Fqn)
- */
- public Map<Object, Object> get(Fqn name) throws Exception
- {
- if (preCacheLoader)
- {
- // Before calling the main cache loader we first check if the data exists in the
local cache
- // in order to prevent multiple call to the cache store
- NodeSPI<Object, Object> node = cache.peek(name, false);
- if (node != null)
- {
- // The node exists which means that the data has already been loaded, so we
return the data
- // already loaded
- return node.getDataDirect();
- }
- else
- {
- // No data has been loaded, so we can call the main cache loader
- return null;
- }
- }
- else
- {
- // The main cache loader has been called but no data could find into the cache
store
- // so to prevent a multiple useless call, we return an empty map to enforce JBC
to create
- // a node that will indicate that the data has already been loaded but no data
was found
- return Collections.emptyMap();
- }
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#getChildrenNames(org.jboss.cache.Fqn)
- */
- public Set<?> getChildrenNames(Fqn fqn) throws Exception
- {
- return null;
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#getConfig()
- */
- public IndividualCacheLoaderConfig getConfig()
- {
- return config;
- }
-
- /**
- * @see
org.jboss.cache.loader.CacheLoader#loadEntireState(java.io.ObjectOutputStream)
- */
- public void loadEntireState(ObjectOutputStream os) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#loadState(org.jboss.cache.Fqn,
java.io.ObjectOutputStream)
- */
- public void loadState(Fqn subtree, ObjectOutputStream os) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#prepare(java.lang.Object, java.util.List,
boolean)
- */
- public void prepare(Object tx, List<Modification> modifications, boolean
onePhase) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#put(java.util.List)
- */
- public void put(List<Modification> modifications) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
- */
- public void put(Fqn name, Map<Object, Object> attributes) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.lang.Object,
java.lang.Object)
- */
- public Object put(Fqn name, Object key, Object value) throws Exception
- {
- return null;
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn)
- */
- public void remove(Fqn fqn) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn,
java.lang.Object)
- */
- public Object remove(Fqn fqn, Object key) throws Exception
- {
- return null;
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#removeData(org.jboss.cache.Fqn)
- */
- public void removeData(Fqn fqn) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#rollback(java.lang.Object)
- */
- public void rollback(Object tx)
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#setCache(org.jboss.cache.CacheSPI)
- */
- public void setCache(CacheSPI cache)
- {
- this.cache = cache;
- }
-
- /**
- * @see
org.jboss.cache.loader.CacheLoader#setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig)
- */
- public void setConfig(IndividualCacheLoaderConfig config)
- {
- this.config = config;
- }
-
- /**
- * @see
org.jboss.cache.loader.CacheLoader#setRegionManager(org.jboss.cache.RegionManager)
- */
- public void setRegionManager(RegionManager manager)
- {
- }
-
- /**
- * @see
org.jboss.cache.loader.CacheLoader#storeEntireState(java.io.ObjectInputStream)
- */
- public void storeEntireState(ObjectInputStream is) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.loader.CacheLoader#storeState(org.jboss.cache.Fqn,
java.io.ObjectInputStream)
- */
- public void storeState(Fqn subtree, ObjectInputStream is) throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.Lifecycle#create()
- */
- public void create() throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.Lifecycle#destroy()
- */
- public void destroy()
- {
- }
-
- /**
- * @see org.jboss.cache.Lifecycle#start()
- */
- public void start() throws Exception
- {
- }
-
- /**
- * @see org.jboss.cache.Lifecycle#stop()
- */
- public void stop()
- {
- }
-}
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml 2010-02-09
08:54:21 UTC (rev 1736)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml 2010-02-09
13:44:35 UTC (rev 1737)
@@ -11,6 +11,10 @@
</clustering>
<loaders passivation="false" shared="true">
+ <!-- All the data of the JCR locks needs to be loaded at startup -->
+ <preload>
+ <node fqn="/" />
+ </preload>
<!--
For another cache-loader class you should use another template with
cache-loader specific parameters
@@ -31,12 +35,4 @@
</properties>
</loader>
</loaders>
- <!-- Eviction configuration -->
- <eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
- eventQueueSize="1000000">
- <property name="maxNodes" value="200000" />
- <property name="timeToLive" value="120000" />
- </default>
- </eviction>
</jbosscache>
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml 2010-02-09
08:54:21 UTC (rev 1736)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml 2010-02-09
13:44:35 UTC (rev 1737)
@@ -5,6 +5,10 @@
lockAcquisitionTimeout="20000" />
<loaders passivation="false" shared="true">
+ <!-- All the data of the JCR locks needs to be loaded at startup -->
+ <preload>
+ <node fqn="/" />
+ </preload>
<!--
For another cache-loader class you should use another template with
cache-loader specific parameters
@@ -25,12 +29,4 @@
</properties>
</loader>
</loaders>
- <!-- Eviction configuration -->
- <eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
- eventQueueSize="1000000">
- <property name="maxNodes" value="10000" />
- <property name="timeToLive" value="120000" />
- </default>
- </eviction>
</jbosscache>