exo-jcr SVN: r1425 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2010-01-16 04:59:17 -0500 (Sat, 16 Jan 2010)
New Revision: 1425
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java
Log:
EXOJCR-325: RW Test based on TestLoadIndexerWriter and TestLoadIndexerQuery
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java 2010-01-16 09:05:27 UTC (rev 1424)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java 2010-01-16 09:59:17 UTC (rev 1425)
@@ -23,7 +23,6 @@
import org.exoplatform.services.jcr.JcrAPIBaseTest;
import org.exoplatform.services.jcr.core.CredentialsImpl;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import org.exoplatform.services.jcr.lab.cluster.prepare.TestLoadIndexerWriter;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -262,12 +261,12 @@
Node threadNode = getRandomChild(rootLocal, "Thread*");
if (threadNode != null)
{
- Node statisticNode = threadNode.getNode(TestLoadIndexerWriter.STATISTIC);
+ Node statisticNode = threadNode.getNode(STATISTIC);
Node wordNode = getRandomChild(statisticNode, "*");
if (wordNode != null)
{
String word = wordNode.getName();
- Long count = wordNode.getProperty(TestLoadIndexerWriter.COUNT).getLong();
+ Long count = wordNode.getProperty(COUNT).getLong();
try
{
16 years, 6 months
exo-jcr SVN: r1424 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache and 1 other directories.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-16 04:05:27 -0500 (Sat, 16 Jan 2010)
New Revision: 1424
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesBuffer.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedChangesBuffer.java
Removed:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedList.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
Log:
EXOJCR-391: Removed ChildListEvictionPolicy and it's test. Replaced CompressedChangesList with CompressedChangesBuffer.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -34,7 +34,6 @@
import org.jgroups.Address;
import java.io.Serializable;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -59,7 +58,7 @@
*/
private final Cache<Serializable, Object> parentCache;
- private ThreadLocal<CompressedChangesList> changesList = new ThreadLocal<CompressedChangesList>();
+ private ThreadLocal<CompressedChangesBuffer> changesList = new ThreadLocal<CompressedChangesBuffer>();
protected static final Log LOG =
ExoLogger.getLogger("org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache");
@@ -75,7 +74,7 @@
*/
public void beginTransaction()
{
- changesList.set(new CompressedChangesList());
+ changesList.set(new CompressedChangesBuffer());
}
/**
@@ -83,7 +82,7 @@
*/
public void commitTransaction()
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -91,9 +90,10 @@
try
{
//log.info("Before=" + changesContainer.toString());
- Collections.sort(changesContainer);
+ //Collections.sort(changesContainer);
+ List<ChangesContainer> containers = changesContainer.getSortedList();
//log.info("After=" + changesContainer.toString());
- for (ChangesContainer cacheChange : changesContainer)
+ for (ChangesContainer cacheChange : containers)
{
cacheChange.apply();
}
@@ -377,7 +377,7 @@
public void put(Fqn fqn, Map<? extends Serializable, ? extends Object> data)
{
//parentCache.put(fqn, data);
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -390,7 +390,7 @@
*/
public Object put(Fqn fqn, Serializable key, Object value)
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -430,7 +430,7 @@
*/
public Object remove(Fqn fqn, Serializable key)
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -476,7 +476,7 @@
*/
public boolean removeNode(Fqn fqn)
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -548,7 +548,7 @@
*/
public void addToList(Fqn fqn, String key, Object value)
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
@@ -565,7 +565,7 @@
*/
public void removeFromList(Fqn fqn, String key, Object value)
{
- CompressedChangesList changesContainer = changesList.get();
+ CompressedChangesBuffer changesContainer = changesList.get();
if (changesContainer == null)
{
throw new IllegalStateException("changesContainer should not be empty");
Deleted: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -1,90 +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.dataflow.persistent.jbosscache;
-
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.eviction.EvictionActionPolicy;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date: 2010
- *
- * @author <a href="mailto:alex.reshetnyak@exoplatform.com.ua">Alex Reshetnyak</a>
- * @version $Id$
- */
-@Deprecated
-public class ChildListEvictionActionPolicy
- implements EvictionActionPolicy
-{
- private static final Log LOG = ExoLogger.getLogger("jcr.ExoEvictionActionPolicy");
-
- private Cache<?, ?> cache;
-
- /**
- * {@inheritDoc}
- */
- public boolean evict(Fqn fqn)
- {
-
- if (fqn.size() == 3 && (JBossCacheWorkspaceStorageCache.CHILD_NODES_LIST.equals(fqn.get(0)) || JBossCacheWorkspaceStorageCache.CHILD_PROPS_LIST.equals(fqn.get(0))))
- {
- return eviction(fqn.getParent(), true);
- }
- else
- {
- return eviction(fqn, false);
- }
- }
-
- private boolean eviction(Fqn fqn, boolean recurcive)
- {
- try
- {
- if (LOG.isDebugEnabled())
- LOG.debug("Evicting Fqn " + fqn);
-
- if (cache.getCacheStatus() == CacheStatus.STARTED)
- {
- cache.evict(fqn, recurcive);
- return true;
- }
- else
- {
- return false;
- }
- }
- catch (Exception e)
- {
- LOG.error("Unable to evict :" + fqn, e);
- return false;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void setCache(Cache<?, ?> cache)
- {
- this.cache = cache;
- }
-
-}
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesBuffer.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesBuffer.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesBuffer.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
+
+import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesContainer;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesType;
+import org.jboss.cache.Fqn;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Sorting cache modification "as is" in {@link BufferedJBossCache} may harm data consistency.
+ * Here is a link, showing possible trouble:
+ * <a href="http://wiki-int.exoplatform.org/display/exoproducts/Problems+encountered+...">Wiki-int page
+ * "Why straightforward sorting in cache is not working..." </a>
+ * <br>
+ * <strong>Example on the page refers to the old cache-usage structure, where list of
+ * child items was stored as JBC nodes. </strong> <br>
+ * For now serialized Set<Object> is used, and it is stored as a JCB attribute. But still
+ * such confusing situation can take place in CHILD_NODES and CHILD_PROPS subtrees in cache.
+ * So wee need to optimize changes made for one subtree with different Fqn levels.<br>
+ * I.e.
+ * <ol>
+ * <li type="1">ADD /$CHILD_NODES/1/11</li>
+ * <li type="1">REMOVE /$CHILD_NODES/1</li>
+ * </ol>
+ * Sorting will reorder them in different way, and there is a possible situation when ADD will be after RM.
+ * So list of changes should be optimized, before being applied. This class performs described modification
+ * for only CHILD_NODES and CHILD_PROPS cache regions using HashMap for the best performance.<br>
+ * <small>Class if not thread safe, cause designed to be used in ThreadLocal variable in {@link BufferedJBossCache}.</small>
+ *
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: CompressedChangesBuffer.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class CompressedChangesBuffer
+{
+ private int historyIndex = 0;
+
+ // Stores changes made to any ordinary cache region
+ List<ChangesContainer> changes = new ArrayList<ChangesContainer>();
+
+ // Stores changes made to /$CHILD_NODES cache region. Stores <ParentUUID> <--> <Change>
+ Map<String, List<ChangesContainer>> childNodesMap = new HashMap<String, List<ChangesContainer>>();
+
+ // Stores changes made to /$CHILD_PROPERTIES cache region. Stores <ParentUUID> <--> <Change>
+ Map<String, List<ChangesContainer>> childPropertyMap = new HashMap<String, List<ChangesContainer>>();
+
+ /**
+ * Adds new modification container to buffer and performs optimization if needed. Optimization doesn't iterate
+ * over lists and uses HashMaps. So each optimization duration doesn't depend on list size.
+ *
+ * @param container
+ */
+ public void add(ChangesContainer container)
+ {
+ String parentCacheNode = (String)container.getFqn().get(0);
+ if (JBossCacheWorkspaceStorageCache.CHILD_NODES.equals(parentCacheNode) && container.getFqn().size() > 1)
+ {
+ optimize(childNodesMap, container);
+ }
+ else if (JBossCacheWorkspaceStorageCache.CHILD_PROPS.equals(parentCacheNode) && container.getFqn().size() > 1)
+ {
+ optimize(childPropertyMap, container);
+ }
+ else
+ {
+ changes.add(container);
+ }
+ }
+
+ /**
+ * After each invocation of the method increments internal field.
+ * Designed to be used as history order index in each {@link ChangesContainer}
+ * @return
+ */
+ public int getHistoryIndex()
+ {
+ historyIndex++;
+ return historyIndex;
+ }
+
+ /**
+ * Builds single list of modifications from internal structures and sorts it.
+ *
+ * @return
+ */
+ public List<ChangesContainer> getSortedList()
+ {
+ List<ChangesContainer> changesContainers = listMap(childNodesMap);
+ changesContainers.addAll(listMap(childPropertyMap));
+ changesContainers.addAll(changes);
+ Collections.sort(changesContainers);
+ return changesContainers;
+ }
+
+ // non-public members
+
+ /**
+ * Adds given container to the list of parent from the Map. If list is missing in the map, it is created and placed.
+ *
+ * @param childMap
+ * @param parent
+ * @param container
+ */
+ private void addToList(Map<String, List<ChangesContainer>> childMap, String parent, ChangesContainer container)
+ {
+ List<ChangesContainer> changesContainers = childMap.get(parent);
+ if (changesContainers == null)
+ {
+ changesContainers = new ArrayList<ChangesContainer>();
+ }
+ changesContainers.add(container);
+ childMap.put(parent, changesContainers);
+ }
+
+ /**
+ * Builds single list from map containing a list by each key.
+ *
+ * @param childMap
+ * @return
+ */
+ private List<ChangesContainer> listMap(Map<String, List<ChangesContainer>> childMap)
+ {
+ List<ChangesContainer> containers = new ArrayList<ChangesContainer>();
+ for (List<ChangesContainer> container : childMap.values())
+ {
+ containers.addAll(container);
+ }
+ return containers;
+ }
+
+ /**
+ * Performs described optimization on buffer.
+ *
+ * @param childMap
+ * @param container
+ */
+ private void optimize(Map<String, List<ChangesContainer>> childMap, ChangesContainer container)
+ {
+ Fqn fqn = container.getFqn();
+ String parent = (String)fqn.get(1);
+ if (fqn.size() == 2)
+ {
+ if (container.getChangesType() == ChangesType.REMOVE)
+ {
+ // omit all changes made on exact fqn and child-fqns
+ childMap.remove(parent);
+ }
+ }
+ addToList(childMap, parent, container);
+ }
+
+}
Property changes on: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesBuffer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -1,285 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * 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.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
-
-import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesContainer;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesType;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-/**
- * This class implement algorithm of list compressing, omitting unnecessary
- * changes and optimizing list. I.e. if added REMOVE /a/b, then list removes
- * all changes made for /a/b/*
- *
- * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
- * @version $Id: CompressedChangesList.java 0 2009-07-22 23:58:59Z nzamosenchuk $
- *
- */
-public class CompressedChangesList implements List<ChangesContainer>
-{
- private List<ChangesContainer> changesList = new ArrayList<ChangesContainer>();
-
- private int historyIndex = 0;
-
- /**
- * After each add this field is incremented, so each change can use it as a
- * history timestamp to identify original order
- * @return
- */
- public int getHistoryIndex()
- {
- return historyIndex;
- }
-
- /**
- * @see java.util.List#add(java.lang.Object)
- */
- public boolean add(ChangesContainer e)
- {
- historyIndex++;
- optimize(e);
- changesList.add(e);
- return false;
- }
-
- private int optimize(ChangesContainer newChange)
- {
-
- Iterator<ChangesContainer> iter = changesList.iterator();
- // if /a/b REMOVE performed, then remove all changes from list
- // made on any child /a/b/* (remove usecase)
- if (newChange.getChangesType() == ChangesType.REMOVE)
- {
- while (iter.hasNext())
- {
- ChangesContainer c = iter.next();
- if (c.getFqn().isChildOrEquals(newChange.getFqn()))
- {
- iter.remove();
- }
- }
- }
- // if /a/b PUT performed, then remove all previous PUT or PUT_VALUE
- // performed on exact /a/b path (rewrite usecase)
- else if (newChange.getChangesType() == ChangesType.PUT)
- {
- while (iter.hasNext())
- {
- ChangesContainer c = iter.next();
- if (c.getFqn().equals(newChange.getFqn()) && c.getChangesType()!= ChangesType.REMOVE)
- {
- iter.remove();
- }
- }
- }
-
- return 0;
- }
-
- /**
- * @see java.util.List#add(int, java.lang.Object)
- */
- public void add(int index, ChangesContainer element)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#addAll(java.util.Collection)
- */
- public boolean addAll(Collection<? extends ChangesContainer> c)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#addAll(int, java.util.Collection)
- */
- public boolean addAll(int index, Collection<? extends ChangesContainer> c)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#clear()
- */
- public void clear()
- {
- changesList.clear();
- }
-
- /**
- * @see java.util.List#contains(java.lang.Object)
- */
- public boolean contains(Object o)
- {
- return changesList.contains(o);
- }
-
- /**
- * @see java.util.List#containsAll(java.util.Collection)
- */
- public boolean containsAll(Collection<?> c)
- {
- return changesList.containsAll(c);
- }
-
- /**
- * @see java.util.List#get(int)
- */
- public ChangesContainer get(int index)
- {
- return changesList.get(index);
- }
-
- /**
- * @see java.util.List#indexOf(java.lang.Object)
- */
- public int indexOf(Object o)
- {
- return changesList.indexOf(o);
- }
-
- /**
- * @see java.util.List#isEmpty()
- */
- public boolean isEmpty()
- {
- return changesList.isEmpty();
- }
-
- /**
- * @see java.util.List#iterator()
- */
- public Iterator<ChangesContainer> iterator()
- {
- return changesList.iterator();
- }
-
- /**
- * @see java.util.List#lastIndexOf(java.lang.Object)
- */
- public int lastIndexOf(Object o)
- {
- return changesList.lastIndexOf(o);
- }
-
- /**
- * @see java.util.List#listIterator()
- */
- public ListIterator<ChangesContainer> listIterator()
- {
- return changesList.listIterator();
- }
-
- /**
- * @see java.util.List#listIterator(int)
- */
- public ListIterator<ChangesContainer> listIterator(int index)
- {
- return changesList.listIterator(index);
- }
-
- /**
- * @see java.util.List#remove(java.lang.Object)
- */
- public boolean remove(Object o)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#remove(int)
- */
- public ChangesContainer remove(int index)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#removeAll(java.util.Collection)
- */
- public boolean removeAll(Collection<?> c)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#retainAll(java.util.Collection)
- */
- public boolean retainAll(Collection<?> c)
- {
- throw new UnsupportedOperationException("Unexpected method call ");
- }
-
- /**
- * @see java.util.List#set(int, java.lang.Object)
- */
- public ChangesContainer set(int index, ChangesContainer element)
- {
- return changesList.set(index, element);
- }
-
- /**
- * @see java.util.List#size()
- */
- public int size()
- {
- return changesList.size();
- }
-
- /**
- * @see java.util.List#subList(int, int)
- */
- public List<ChangesContainer> subList(int fromIndex, int toIndex)
- {
- return changesList.subList(fromIndex, toIndex);
- }
-
- /**
- * @see java.util.List#toArray()
- */
- public Object[] toArray()
- {
- return changesList.toArray();
- }
-
- /**
- * @see java.util.List#toArray(T[])
- */
- public <T> T[] toArray(T[] a)
- {
- return changesList.toArray(a);
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return changesList.toString();
- }
-
-}
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedChangesBuffer.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedChangesBuffer.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedChangesBuffer.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
+
+import junit.framework.TestCase;
+
+import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesContainer;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.PutObjectContainer;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.RemoveNodeContainer;
+import org.jboss.cache.Fqn;
+
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:foo@bar.org">Foo Bar</a>
+ * @version $Id: exo-jboss-codetemplates.xml 34360 2009-07-22 23:58:59Z aheritier $
+ *
+ */
+public class TestCompressedChangesBuffer extends TestCase
+{
+
+ public void testPutOmit()
+ {
+ CompressedChangesBuffer buffer = new CompressedChangesBuffer();
+ ChangesContainer put1 =
+ new PutObjectContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b"),
+ new HashMap<String, String>(), null, buffer.getHistoryIndex());
+ ChangesContainer put2 =
+ new PutObjectContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b/c"),
+ new HashMap<String, String>(), null, buffer.getHistoryIndex());
+ ChangesContainer rm1 =
+ new RemoveNodeContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b"), null, buffer
+ .getHistoryIndex());
+ buffer.add(put1);
+ buffer.add(put2);
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put2));
+ buffer.add(rm1);
+ assertFalse("List still contains put container", buffer.getSortedList().contains(put1));
+ assertFalse("List still contains put container", buffer.getSortedList().contains(put2));
+ assertTrue("List MUST contain remove container", buffer.getSortedList().contains(rm1));
+ buffer.add(put1);
+ buffer.add(put2);
+ assertTrue("List MUST contain remove container", buffer.getSortedList().contains(rm1));
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put2));
+ }
+
+ public void testRemoveOmit()
+ {
+ CompressedChangesBuffer buffer = new CompressedChangesBuffer();
+ ChangesContainer put1 =
+ new PutObjectContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b"),
+ new HashMap<String, String>(), null, buffer.getHistoryIndex());
+
+ ChangesContainer put2 =
+ new PutObjectContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b/c"),
+ new HashMap<String, String>(), null, buffer.getHistoryIndex());
+ ChangesContainer rm1 =
+ new RemoveNodeContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b/c"), null,
+ buffer.getHistoryIndex());
+ ChangesContainer rm2 =
+ new RemoveNodeContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES + "/b"), null, buffer
+ .getHistoryIndex());
+ buffer.add(put1);
+ buffer.add(put2);
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put2));
+ buffer.add(rm1);
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ assertTrue("List MUST contain remove container", buffer.getSortedList().contains(rm1));
+ buffer.add(rm2);
+ assertTrue("List MUST contain remove container", buffer.getSortedList().contains(rm2));
+ assertFalse("List still contains put container", buffer.getSortedList().contains(put1));
+ assertFalse("List still contains put container", buffer.getSortedList().contains(put2));
+ assertFalse("List still contains put container", buffer.getSortedList().contains(rm1));
+ }
+
+ public void testNoChangeOnRegion()
+ {
+ CompressedChangesBuffer buffer = new CompressedChangesBuffer();
+ ChangesContainer put1 =
+ new PutObjectContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES_LIST + "/b"),
+ new HashMap<String, String>(), null, buffer.getHistoryIndex());
+
+ ChangesContainer rm1 =
+ new RemoveNodeContainer(Fqn.fromString("/" + JBossCacheWorkspaceStorageCache.CHILD_NODES_LIST + "/b"), null,
+ buffer.getHistoryIndex());
+ buffer.add(put1);
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ buffer.add(rm1);
+ assertTrue("List MUST contain put container", buffer.getSortedList().contains(put1));
+ assertTrue("List MUST contain remove container", buffer.getSortedList().contains(rm1));
+ }
+
+}
Property changes on: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedChangesBuffer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedList.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedList.java 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestCompressedList.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * 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.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
-
-import junit.framework.TestCase;
-
-import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.ChangesContainer;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.PutObjectContainer;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.BufferedJBossCache.RemoveNodeContainer;
-import org.jboss.cache.Fqn;
-
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:foo@bar.org">Foo Bar</a>
- * @version $Id: exo-jboss-codetemplates.xml 34360 2009-07-22 23:58:59Z aheritier $
- *
- */
-public class TestCompressedList extends TestCase
-{
-
- public void testPutOmit()
- {
- CompressedChangesList changesList = new CompressedChangesList();
- ChangesContainer put1 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer put2 =
- new PutObjectContainer(Fqn.fromString("/a/b/c"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer rm1 = new RemoveNodeContainer(Fqn.fromString("/a/b"), null, changesList.getHistoryIndex());
- changesList.add(put1);
- changesList.add(put2);
- assertTrue("List MUST contain put container", changesList.contains(put1));
- assertTrue("List MUST contain put container", changesList.contains(put2));
- changesList.add(rm1);
- assertFalse("List still contains put container", changesList.contains(put1));
- assertFalse("List still contains put container", changesList.contains(put2));
- assertTrue("List MUST contain remove container", changesList.contains(rm1));
- }
-
- public void testDoublePutOmit()
- {
- CompressedChangesList changesList = new CompressedChangesList();
- ChangesContainer put1 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer put2 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
-
- changesList.add(put1);
- assertTrue("List MUST contain put container", changesList.contains(put1));
- changesList.add(put2);
- assertFalse("List still contains old put container", changesList.contains(put1));
- assertTrue("List MUST contain new put container", changesList.contains(put2));
- }
-
- public void testPutKeyOmit()
- {
- CompressedChangesList changesList = new CompressedChangesList();
- ChangesContainer put1 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer put2 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
-
- changesList.add(put1);
- assertTrue("List MUST contain put container", changesList.contains(put1));
- changesList.add(put2);
- assertFalse("List still contains old put container", changesList.contains(put1));
- assertTrue("List MUST contain new put container", changesList.contains(put2));
- }
-
- public void testPutChildOmit()
- {
- CompressedChangesList changesList = new CompressedChangesList();
- ChangesContainer put1 =
- new PutObjectContainer(Fqn.fromString("/a/b"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer put2 =
- new PutObjectContainer(Fqn.fromString("/a/b/c"), new HashMap<String, String>(), null, changesList
- .getHistoryIndex());
- ChangesContainer rm1 = new RemoveNodeContainer(Fqn.fromString("/a/b"), null, changesList.getHistoryIndex());
- changesList.add(put1);
- changesList.add(put2);
- assertTrue("List MUST contain put container", changesList.contains(put1));
- assertTrue("List MUST contain put container", changesList.contains(put2));
- changesList.add(rm1);
- assertFalse("List still contains old put container", changesList.contains(put1));
- assertFalse("List still contains old put container", changesList.contains(put2));
- assertTrue("List MUST contain remove container", changesList.contains(rm1));
- }
-
-}
Deleted: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java 2010-01-16 09:05:27 UTC (rev 1424)
@@ -1,190 +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.dataflow.persistent.jbosscache;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.Map;
-
-import org.exoplatform.services.cache.CacheListenerContext;
-import org.exoplatform.services.jcr.JcrImplBaseTest;
-import org.exoplatform.services.jcr.access.AccessControlList;
-import org.exoplatform.services.jcr.datamodel.InternalQName;
-import org.exoplatform.services.jcr.datamodel.QPath;
-import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.util.IdGenerator;
-import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.cache.notifications.annotation.CacheListener;
-import org.jboss.cache.notifications.annotation.NodeEvicted;
-import org.jboss.cache.notifications.event.NodeEvent;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date: 2010
- *
- * @author <a href="mailto:alex.reshetnyak@exoplatform.com.ua">Alex Reshetnyak</a>
- * @version $Id$
- */
-@CacheListener
-public class TestExoEvictionActionPolicy
- extends JcrImplBaseTest
-{
- protected Cache<Serializable, Object> cache;
-
- protected Fqn<String> itemsRoot;
-
- protected Fqn<String> childNodesList;
-
- protected Fqn<String> childPropsList;
-
- protected String jbcConfig;
-
- public static final Map<Serializable, Object> NULL_DATA = Collections.emptyMap();
-
- public void setUp() throws Exception
- {
- super.setUp();
-
- initJBCConfig();
-
- cache = new DefaultCacheFactory<Serializable, Object>().createCache(jbcConfig, false);
-
- cache.create();
- cache.start();
-
- Node<Serializable, Object> cacheRoot = cache.getRoot();
-
- this.itemsRoot = Fqn.fromElements(JBossCacheWorkspaceStorageCache.ITEMS);
- cacheRoot.addChild(this.itemsRoot).setResident(true);
-
- this.childNodesList = Fqn.fromElements(JBossCacheWorkspaceStorageCache.CHILD_NODES_LIST);
- cacheRoot.addChild(this.childNodesList).setResident(true);
-
- this.childPropsList = Fqn.fromElements(JBossCacheWorkspaceStorageCache.CHILD_PROPS_LIST);
- cacheRoot.addChild(this.childPropsList).setResident(true);
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- cache.stop();
- cache.destroy();
- }
-
- protected void initJBCConfig()
- {
- jbcConfig = "src/test/resources/conf/standalone/test-jbosscache-exo-config.xml";
- }
-
- public void testEviction() throws Exception
- {
-
- String evictionNodeId = IdGenerator.generate();
-
- TransientNodeData evictionNodeData = new TransientNodeData(QPath.parse("[]:1[]node:1"), evictionNodeId, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
- IdGenerator.generate(), new AccessControlList());
-
- String evictionPropId = IdGenerator.generate();
-
- TransientPropertyData evictionPropData = new TransientPropertyData(QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]prop1")), evictionPropId, 1, 1, evictionNodeId, false, new TransientValueData("Property value #1"));
-
- // add nodes who will be eviction
- // put NodeData
- cache.put(Fqn.fromRelativeElements(itemsRoot, evictionNodeData.getIdentifier()), JBossCacheWorkspaceStorageCache.ITEM_DATA, evictionNodeData);
-
- // put PropertyData
- cache.put(Fqn.fromRelativeElements(itemsRoot, evictionPropData.getIdentifier()), JBossCacheWorkspaceStorageCache.ITEM_DATA, evictionPropData);
-
- // put to CHILD_NODES_LIST
- cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), evictionNodeData.getIdentifier()), NULL_DATA);
-
- for (int i = 0 ; i < 10; i++)
- cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), IdGenerator.generate()), NULL_DATA);
-
- // put to CHILD_PROPS_LIST
- cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), evictionPropData.getIdentifier()), NULL_DATA);
-
- for (int i = 0 ; i < 10; i++)
- cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), IdGenerator.generate()), NULL_DATA);
-
-
- // check for exists
- assertEquals( 2, cache.getChildrenNames(itemsRoot).size());
- assertNotNull(cache.getNode(Fqn.fromRelativeElements(itemsRoot, evictionNodeData.getIdentifier())));
- assertNotNull(cache.getNode(Fqn.fromRelativeElements(itemsRoot, evictionPropData.getIdentifier())));
-
- assertNotNull(cache.getNode(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), evictionNodeData.getIdentifier())));
- assertNotNull(cache.getNode(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), evictionPropData.getIdentifier())));
-
- assertEquals( 11, cache.getChildrenNames(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier())).size());
- assertEquals( 11, cache.getChildrenNames(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier())).size());
-
-
- Thread.sleep(10 * 1000);
-
- cache.addCacheListener(this);
-
- for (int i = 0 ; i< 50; i++)
- {
- TransientNodeData evicNodeData = new TransientNodeData(QPath.parse("[]:1[]node" + i + ":1"), IdGenerator.generate(), 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
- Constants.ROOT_UUID, new AccessControlList());
- cache.put(Fqn.fromRelativeElements(itemsRoot, evicNodeData.getIdentifier()), JBossCacheWorkspaceStorageCache.ITEM_DATA, evicNodeData);
- }
-
- Thread.sleep(15 * 1000);
-
- // check
- assertNull(cache.getNode(Fqn.fromRelativeElements(itemsRoot, evictionNodeData.getIdentifier())));
- assertNull(cache.getNode(Fqn.fromRelativeElements(itemsRoot, evictionPropData.getIdentifier())));
-
- assertNull(cache.getNode(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier())));
- assertNull(cache.getNode(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier())));
- }
-
- @NodeEvicted
- public void createdNodeEvent(NodeEvent ne)
- {
-// System.out.println("Node evicted: " + ne.getFqn());
- }
-
-
- public void testEvictionRecurcive() throws Exception
- {
- String parentId = IdGenerator.generate();
-
- // put to CHILD_PROPS_LIST
- cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), NULL_DATA);
-
- for (int i = 0 ; i < 10; i++)
- cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), NULL_DATA);
-
-
- assertEquals( 11, cache.getChildrenNames(Fqn.fromRelativeElements(childPropsList, parentId)).size());
-
- cache.evict(Fqn.fromRelativeElements(childPropsList, parentId), true);
-
- assertNull(cache.getNode(Fqn.fromRelativeElements(childPropsList, parentId)));
- }
-}
Deleted: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml 2010-01-16 08:52:21 UTC (rev 1423)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml 2010-01-16 09:05:27 UTC (rev 1424)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
-
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
-
- <!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />
-
- <!-- Enable batching -->
- <invocationBatching enabled="true" />
-
- <!-- Eviction configuration -->
- <eviction wakeUpInterval="3000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <property name="maxNodes" value="50" />
- <property name="timeToLive" value="20000" />
- </default>
- <region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ChildListEvictionActionPolicy" eventQueueSize="1000000">
- <property name="maxNodes" value="50" />
- <property name="timeToLive" value="20000" />
- </region>
- </eviction>
-
-</jbosscache>
16 years, 6 months
exo-jcr SVN: r1423 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2010-01-16 03:52:21 -0500 (Sat, 16 Jan 2010)
New Revision: 1423
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java
Log:
EXOJCR-325: RW Test based on TestLoadIndexerWriter and TestLoadIndexerQuery
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestReadNWrite.java 2010-01-16 08:52:21 UTC (rev 1423)
@@ -0,0 +1,320 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.services.jcr.lab.cluster.test;
+
+import junit.framework.AssertionFailedError;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.lab.cluster.prepare.TestLoadIndexerWriter;
+
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+import javax.jcr.query.QueryResult;
+
+/**
+ * @author <a href="mailto:nicolas.filotto@exoplatform.com">Nicolas Filotto</a>
+ * @version $Id$
+ *
+ */
+public class TestReadNWrite extends JcrAPIBaseTest
+{
+ private boolean stop = false;
+
+ public static final String COUNT = "count";
+
+ public static final String CONTENT = "Content";
+
+ public static final String STATISTIC = "Statistic";
+
+ private int threadWriterCount = 10;
+
+ private int threadReaderCount = 20;
+
+ private final CountDownLatch doneSignal = new CountDownLatch(threadReaderCount + threadWriterCount);
+
+ private static final String[] words =
+ new String[]{"private", "branch", "final", "string", "logging", "bottle", "property", "node", "repository",
+ "exception", "cycle", "value", "index", "meaning", "strange", "words", "hello", "outline", "finest",
+ "basetest", "writer"};
+
+ public void testReadNWrite() throws Exception
+ {
+ log.info("Creating threads...");
+ for (int i = 0; i < threadWriterCount; i++)
+ {
+ // create new thread and start it
+ new Thread(new WriterTask(i), "Writer-Thread-" + (i + 1)).start();
+ log.info("Writer-Thread-" + (i + 1) + " created and started.");
+ }
+ for (int i = 0; i < threadReaderCount; i++)
+ {
+ // create new thread and start it
+ new Thread(new QueryTask(), "Reader-Thread-" + (i + 1)).start();
+ log.info("Reader-Thread-" + (i + 1) + " created and started.");
+ }
+
+ // wait 4 minutes
+ try
+ {
+ //Thread.sleep(60000 * 4);
+ synchronized (this)
+ {
+ wait();
+ }
+ }
+ catch (InterruptedException e)
+ {
+ log.error(e);
+ }
+
+ stop = true;
+ doneSignal.await();
+ System.exit(0);
+ }
+
+ private class WriterTask implements Runnable
+ {
+
+ private int id;
+
+ private SessionImpl sessionLocal;
+
+ private Node statisticNode;
+
+ private Node contentNode;
+
+ private Random random;
+
+ public WriterTask(int id) throws RepositoryException
+ {
+ this.id = id;
+ // login
+ CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+ sessionLocal = (SessionImpl)repository.login(credentials, "ws");
+ // prepare nodes
+ Node root = sessionLocal.getRootNode();
+ Node threadNode = root.addNode("Thread" + id);
+ statisticNode = threadNode.addNode(STATISTIC);
+ contentNode = threadNode.addNode(CONTENT);
+ random = new Random();
+ sessionLocal.save();
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run()
+ {
+ try
+ {
+ while (!stop)
+ {
+ long time = System.currentTimeMillis();
+ // get any word
+ int i = random.nextInt(words.length);
+ String word = words[i] + id; // "hello12" if thread#12 is creating it
+ try
+ {
+ // update statistic
+ updateStatistic(word);
+ // add actual node
+ createTree().addNode(word);
+ sessionLocal.save();
+ System.out.println(Thread.currentThread() + " time : " + (System.currentTimeMillis() - time));
+ }
+ catch (Exception e1)
+ {
+ log.error("An error occurs", e1);
+ }
+
+ try
+ {
+ Thread.sleep(300);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("An unexpected error happens", e);
+ }
+ finally
+ {
+ doneSignal.countDown();
+ }
+ }
+
+ /**
+ * increments property in JCR: "./statistic/[word].count"
+ *
+ * @param word
+ * @throws RepositoryException
+ */
+ private void updateStatistic(String word) throws RepositoryException
+ {
+ Node wordNode;
+ long count = 0;
+ if (statisticNode.hasNode(word))
+ {
+ wordNode = statisticNode.getNode(word);
+ count = wordNode.getProperty(COUNT).getLong();
+ }
+ else
+ {
+ wordNode = statisticNode.addNode(word);
+ }
+ wordNode.setProperty(COUNT, count + 1);
+ }
+
+ /**
+ * Created node tree like: "./content/n123456/n1234567/n12345678"
+ * based on current time
+ *
+ * @return
+ * @throws RepositoryException
+ */
+ private Node createTree() throws RepositoryException
+ {
+ // created node tree like: "./content/n123456/n1234567/n12345678"
+ Node end;
+ long time = System.currentTimeMillis();
+ long child1 = time / 100000; // each 100s new node
+ long child2 = time / 10000; // each 10s new node
+ long child3 = time / 1000; // each 1s new node
+ end = addOrCreate("n" + child1, contentNode);
+ end = addOrCreate("n" + child2, end);
+ end = addOrCreate("n" + child3, end);
+ return end;
+ }
+
+ /**
+ * Gets or creates node
+ *
+ * @param name
+ * @param parent
+ * @return
+ * @throws RepositoryException
+ */
+ private Node addOrCreate(String name, Node parent) throws RepositoryException
+ {
+ if (parent.hasNode(name))
+ {
+ return parent.getNode(name);
+ }
+ else
+ return parent.addNode(name);
+ }
+ }
+
+ private class QueryTask implements Runnable
+ {
+ private SessionImpl sessionLocal;
+
+ private Node rootLocal;
+
+ private Random random;
+
+ public QueryTask() throws RepositoryException
+ {
+ // login
+ CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+ sessionLocal = (SessionImpl)repository.login(credentials, "ws");
+ // prepare nodes
+ rootLocal = sessionLocal.getRootNode();
+ random = new Random();
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run()
+ {
+ while (!stop)
+ {
+ try
+ {
+ Node threadNode = getRandomChild(rootLocal, "Thread*");
+ if (threadNode != null)
+ {
+ Node statisticNode = threadNode.getNode(TestLoadIndexerWriter.STATISTIC);
+ Node wordNode = getRandomChild(statisticNode, "*");
+ if (wordNode != null)
+ {
+ String word = wordNode.getName();
+ Long count = wordNode.getProperty(TestLoadIndexerWriter.COUNT).getLong();
+
+ try
+ {
+ Thread.sleep(2000);
+ }
+ catch (InterruptedException e1)
+ {
+ }
+ long time = System.currentTimeMillis();
+ QueryManager qman = sessionLocal.getWorkspace().getQueryManager();
+
+ Query q = qman.createQuery("SELECT * FROM nt:base WHERE fn:name() = '" + word + "'", Query.SQL);
+ QueryResult res = q.execute();
+ long sqlsize = res.getNodes().getSize();
+ try
+ {
+ assertTrue("Exp: " + count + "\t found:" + sqlsize, sqlsize >= count);
+ System.out.println(Thread.currentThread() + " size : " + sqlsize + " time : "
+ + (System.currentTimeMillis() - time));
+ }
+ catch (AssertionFailedError e)
+ {
+ System.out
+ .println((Thread.currentThread() + " error : " + e.getMessage() + " time : " + (System
+ .currentTimeMillis() - time)));
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("An error occurs", e);
+ }
+ }
+ doneSignal.countDown();
+ }
+
+ private Node getRandomChild(Node parent, String pattern) throws RepositoryException
+ {
+ NodeIterator iterator = parent.getNodes(pattern);
+ if (iterator.getSize() < 1)
+ {
+ return null;
+ }
+ int i = random.nextInt((int)iterator.getSize());
+ iterator.skip(i);
+ return iterator.nextNode();
+ }
+ }
+}
16 years, 6 months
exo-jcr SVN: r1422 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-15 18:39:45 -0500 (Fri, 15 Jan 2010)
New Revision: 1422
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java
Log:
EXOJCR-325: WORDS variable name/visibility fix
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java 2010-01-15 17:09:54 UTC (rev 1421)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java 2010-01-15 23:39:45 UTC (rev 1422)
@@ -44,7 +44,7 @@
private int threadCount = 1;
- private static final String[] words =
+ public static final String[] WORDS =
new String[]{"private", "branch", "final", "string", "logging", "bottle", "property", "node", "repository",
"exception", "cycle", "value", "index", "meaning", "strange", "words", "hello", "outline", "finest",
"basetest", "writer"};
@@ -110,8 +110,8 @@
while (!stop)
{
// get any word
- int i = random.nextInt(words.length);
- String word = words[i] + id; // "hello12" if thread#12 is creating it
+ int i = random.nextInt(WORDS.length);
+ String word = WORDS[i] + id; // "hello12" if thread#12 is creating it
// update statistic
updateStatistic(word);
// add actual node
16 years, 6 months
exo-jcr SVN: r1421 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-15 12:09:54 -0500 (Fri, 15 Jan 2010)
New Revision: 1421
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadPredictableIndexerQuery.java
Log:
EXOJCR-331 : test added
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadPredictableIndexerQuery.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadPredictableIndexerQuery.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadPredictableIndexerQuery.java 2010-01-15 17:09:54 UTC (rev 1421)
@@ -0,0 +1,238 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.services.jcr.lab.cluster.test;
+
+import junit.framework.AssertionFailedError;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.lab.cluster.prepare.TestLoadIndexerWriter;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+import java.util.Random;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+import javax.jcr.query.QueryResult;
+
+/**
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: TestLoadIndexerQuery.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class TestLoadPredictableIndexerQuery extends JcrAPIBaseTest
+{
+ protected final Log log = ExoLogger.getLogger(TestLoadPredictableIndexerQuery.class);
+
+ private boolean stop = false;
+
+ private int queryThreadCount = 20;
+
+ private int writerThreadCount = 3;
+
+ public void testQuery()
+ {
+ log.info("Creating threads...");
+ try
+ {
+ for (int i = 0; i < queryThreadCount; i++)
+ {
+ // create new thread and start it
+ new Thread(new ReadTask()).start();
+ log.info("Thread#" + i + " created and started.");
+ }
+
+ // wait 4 minutes
+ try
+ {
+ Thread.sleep(60000 * 60);
+ }
+ catch (InterruptedException e)
+ {
+ log.error(e);
+ }
+
+ stop = true;
+ }
+ catch (Exception e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ System.exit(0);
+ }
+
+ private class ReadTask implements Runnable
+ {
+ private SessionImpl sessionLocal;
+
+ private Node rootLocal;
+
+ private Random random;
+
+ public ReadTask() throws RepositoryException
+ {
+ // login
+ CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+ sessionLocal = (SessionImpl)repository.login(credentials, "ws");
+ // prepare nodes
+ rootLocal = sessionLocal.getRootNode();
+ random = new Random();
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run()
+ {
+ try
+ {
+ while (!stop)
+ {
+ Node threadNode = getRandomChild(rootLocal, "Thread*");
+ if (threadNode != null)
+ {
+ // StringBuffer sb = new StringBuffer();
+ // dump(threadNode, sb);
+ // log.info(sb.toString());
+
+ Node statisticNode = threadNode.getNode(TestLoadIndexerWriter.STATISTIC);
+ Node contentNode = threadNode.getNode(TestLoadIndexerWriter.CONTENT);
+ Node wordNode = getRandomStatisticChild(statisticNode);
+ if (wordNode != null)
+ {
+ String word = wordNode.getName();
+ Long count = wordNode.getProperty(TestLoadIndexerWriter.COUNT).getLong();
+
+ try
+ {
+ Thread.sleep(1);
+ }
+ catch (InterruptedException e1)
+ {
+ }
+
+ QueryManager qman = sessionLocal.getWorkspace().getQueryManager();
+
+ Query q =
+ qman.createQuery("SELECT * FROM nt:base WHERE jcr:path LIKE '" + contentNode.getPath()
+ + "/%' and fn:name() = '" + word + "'", Query.SQL);
+ QueryResult res = q.execute();
+ long sqlsize = res.getNodes().getSize();
+ System.out.println("Exp: " + count + "\t found:" + sqlsize);
+ try
+ {
+ //assertTrue("Exp: "+count+"\t found:"+sqlsize, sqlsize >= count);
+
+ }
+ catch (AssertionFailedError e)
+ {
+ System.out.println("-" + e.getMessage());
+ }
+ }
+ }
+ }
+
+ }
+ catch (RepositoryException e)
+ {
+ log.error(e);
+ }
+ }
+
+ private void dump(Node nodesRoot, StringBuffer buffer) throws RepositoryException
+ {
+ PropertyIterator iter = nodesRoot.getProperties();
+ while (iter.hasNext())
+ {
+ Property prop = iter.nextProperty();
+ buffer.append(prop.getName()).append("=").append(prop.getString()).append("\n");
+ }
+ for (NodeIterator children = nodesRoot.getNodes(); children.hasNext();)
+ {
+ Node node = children.nextNode();
+ buffer.append(node.getPath()).append("\n");
+ dump(node, buffer);
+ }
+ }
+
+ private Node getRandomStatisticChild(Node parent) throws RepositoryException
+ {
+ // NodeIterator iterator = parent.getNodes(pattern);
+ // if (iterator.getSize() < 1)
+ // {
+ // return null;
+ // }
+ // int i = random.nextInt((int)iterator.getSize());
+ // iterator.skip(i);
+ // return iterator.nextNode();
+
+ int i = random.nextInt(TestLoadIndexerWriter.WORDS.length);
+ Node result = null;
+ for (int j = 0; j < writerThreadCount; j++)
+ {
+ try
+ {
+ result = parent.getNode(TestLoadIndexerWriter.WORDS[i] + j);
+ if (result != null)
+ break;
+ }
+ catch (Exception e)
+ {
+ // TODO Auto-generated catch block
+ // e.printStackTrace();
+ }
+ }
+
+ return result;
+ }
+
+ private Node getRandomChild(Node parent, String pattern) throws RepositoryException
+ {
+ // NodeIterator iterator = parent.getNodes(pattern);
+ // if (iterator.getSize() < 1)
+ // {
+ // return null;
+ // }
+ // int i = random.nextInt((int)iterator.getSize());
+ // iterator.skip(i);
+ // return iterator.nextNode();
+
+ int i = random.nextInt(writerThreadCount);
+ Node result = null;
+ try
+ {
+ result = parent.getNode("Thread" + i);
+ }
+ catch (Exception e)
+ {
+ // TODO Auto-generated catch block
+ // e.printStackTrace();
+ }
+ return result;
+ }
+ }
+}
Property changes on: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadPredictableIndexerQuery.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 6 months
exo-jcr SVN: r1420 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-15 10:55:43 -0500 (Fri, 15 Jan 2010)
New Revision: 1420
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml
Log:
EXOJCR-331 : update txtimeout
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml 2010-01-15 15:51:13 UTC (rev 1419)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml 2010-01-15 15:55:43 UTC (rev 1420)
@@ -207,7 +207,7 @@
<init-params>
<value-param>
<name>timeout</name>
- <value>20</value>
+ <value>300</value>
</value-param>
</init-params>
</component>
16 years, 6 months
exo-jcr SVN: r1419 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl and 2 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-01-15 10:51:13 -0500 (Fri, 15 Jan 2010)
New Revision: 1419
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-332 : Add parameter class to lock manager configuration.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java 2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java 2010-01-15 15:51:13 UTC (rev 1419)
@@ -22,7 +22,7 @@
* @author <a href="mailto:Sergey.Kabashnyuk@gmail.com">Sergey Kabashnyuk</a>
* @version $Id: LockManagerEntry.java 11907 2008-03-13 15:36:21Z ksm $
*/
-public class LockManagerEntry
+public class LockManagerEntry extends MappedParametrizedObjectEntry
{
private long timeout = -1;
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java 2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java 2010-01-15 15:51:13 UTC (rev 1419)
@@ -267,15 +267,24 @@
}
}
- if ( wsConfig.getLockManager() != null && wsConfig.getLockManager().getCacheConfig() != null)
+
+ if (wsConfig.getLockManager() != null && wsConfig.getLockManager().getType() != null)
{
- workspaceContainer.registerComponentImplementation(CacheableLockManager.class);
+ try
+ {
+ Class<?> lockManagerType = Class.forName(wsConfig.getLockManager().getType());
+ workspaceContainer.registerComponentImplementation(lockManagerType);
+ } catch (ClassNotFoundException e) {
+ throw new RepositoryConfigurationException("Class not found for workspace lock manager "
+ + wsConfig.getLockManager().getType() + ", container " + wsConfig.getUniqueName()
+ + " : " + e);
+ }
}
else
{
workspaceContainer.registerComponentImplementation(LockManagerImpl.class);
}
-
+
// Query handler
if (wsConfig.getQueryHandler() != null)
{
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml 2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml 2010-01-15 15:51:13 UTC (rev 1419)
@@ -65,10 +65,11 @@
</structure>
<structure name="lock-manager" field="lockManager" usage="optional">
+ <value name="class" field="type" style="attribute" usage="optional" />
<value name="time-out" field="timeout" usage="optional"
deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseTime" />
- <value name="cache-config" field="cacheConfig" usage="optional" />
+ <value name="jbosscache-configuration" field="cacheConfig" usage="optional" />
<structure name="persister" field="persister" usage="optional">
<value name="class" field="type" style="attribute" />
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-01-15 15:51:13 UTC (rev 1419)
@@ -79,9 +79,9 @@
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
@@ -122,9 +122,9 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
@@ -165,9 +165,9 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
@@ -240,9 +240,9 @@
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
</workspaces>
@@ -300,9 +300,9 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
@@ -349,9 +349,9 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
@@ -401,9 +401,9 @@
<property name="extractorTimeout" value="10"/>
</properties>
</query-handler>
- <lock-manager>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
<time-out>15m</time-out>
- <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+ <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
</lock-manager>
</workspace>
</workspaces>
16 years, 6 months
exo-jcr SVN: r1418 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-15 10:27:51 -0500 (Fri, 15 Jan 2010)
New Revision: 1418
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
Log:
EXOJCR-391: ChildListEvictionActionPolicy marked as deprecated.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-15 15:26:08 UTC (rev 1417)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-15 15:27:51 UTC (rev 1418)
@@ -31,6 +31,7 @@
* @author <a href="mailto:alex.reshetnyak@exoplatform.com.ua">Alex Reshetnyak</a>
* @version $Id$
*/
+@Deprecated
public class ChildListEvictionActionPolicy
implements EvictionActionPolicy
{
16 years, 6 months
exo-jcr SVN: r1417 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock: jbosscache and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-01-15 10:26:08 -0500 (Fri, 15 Jan 2010)
New Revision: 1417
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockImpl.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
Log:
EXOJCR-332: CacheableLockManager code cleanup
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockImpl.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockImpl.java 2010-01-15 15:02:55 UTC (rev 1416)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockImpl.java 2010-01-15 15:26:08 UTC (rev 1417)
@@ -100,7 +100,7 @@
return lockData.getTimeToDeath();
}
- protected void setTimeOut(long timeOut)
+ protected void setTimeOut(long timeOut) throws LockException
{
lockData.setTimeOut(timeOut);
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java 2010-01-15 15:02:55 UTC (rev 1416)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java 2010-01-15 15:26:08 UTC (rev 1417)
@@ -41,6 +41,13 @@
private CacheableLockManager lockManager;
+ /**
+ * Constructor.
+ *
+ * @param session - session owner
+ * @param lockData - LockData
+ * @param lockManager - CacheableLockManager
+ */
public CacheLockImpl(SessionImpl session, LockData lockData, CacheableLockManager lockManager)
{
this.lockData = lockData;
@@ -49,39 +56,39 @@
this.live = true;
}
+ /**
+ * {@inheritDoc}
+ */
public String getLockOwner()
{
return lockData.getOwner();
}
+ /**
+ * {@inheritDoc}
+ */
public String getLockToken()
{
return lockManager.getLockToken(session.getId(), lockData);
}
+ /**
+ * {@inheritDoc}
+ */
public boolean isLive()
{
- // it is already not alive
if (!live)
{
+ // it is already not alive
return false;
}
- // update from cache. If it is not present there - means it is not live
- // node unlocked and/or re-locked with another session
- LockData newlockData = lockManager.getLockDataById(lockData.getNodeIdentifier());
- if (newlockData == null || newlockData.getToken() != lockData.getToken())
- {
- live = false;
- return false;
- }
- else
- {
- // update, whether time to death changed, or whatever
- this.lockData = newlockData;
- return true;
- }
+ live = lockManager.isLockLive(lockData.getNodeIdentifier());
+ return live;
}
+ /**
+ * {@inheritDoc}
+ */
public void refresh() throws LockException, RepositoryException
{
if (!isLive())
@@ -95,6 +102,9 @@
lockData = newLockData;
}
+ /**
+ * {@inheritDoc}
+ */
public Node getNode()
{
try
@@ -108,35 +118,39 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
public boolean isDeep()
{
return lockData.isDeep();
}
+ /**
+ * {@inheritDoc}
+ */
public boolean isSessionScoped()
{
return lockData.isSessionScoped();
}
+ /**
+ * {@inheritDoc}
+ */
public long getTimeToDeath()
{
return lockData.getTimeToDeath();
}
- protected void setTimeOut(long timeOut)
+ /**
+ * {@inheritDoc}
+ */
+ protected void setTimeOut(long timeOut) throws LockException
{
lockData.setTimeOut(timeOut);
//reset lock data
- try
- {
- lockManager.refresh(lockData);
- }
- catch (LockException e)
- {
- // TODO remove or change this
- e.printStackTrace();
- }
+ lockManager.refresh(lockData);
}
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-15 15:02:55 UTC (rev 1416)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-15 15:26:08 UTC (rev 1417)
@@ -16,23 +16,6 @@
*/
package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-import java.io.Serializable;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockException;
-
import org.exoplatform.management.annotations.Managed;
import org.exoplatform.management.annotations.ManagedDescription;
import org.exoplatform.management.jmx.annotations.NameTemplate;
@@ -75,6 +58,23 @@
import org.jboss.cache.Node;
import org.picocontainer.Startable;
+import java.io.Serializable;
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.lock.Lock;
+import javax.jcr.lock.LockException;
+
/**
* Created by The eXo Platform SAS.
*
@@ -109,14 +109,15 @@
private static final int SEARCH_CLOSEDCHILD = 4;
/**
- * Path to jbosscache-configuration
+ * Name of lock root in jboss-cache.
*/
- public static final String JBOSSCACHE_CONFIG = "jbosscache-configuration";
+ public static final String LOCKS = "$LOCKS";
+ /**
+ * Attribute name where LockData will be stored.
+ */
public static final String LOCK_DATA = "$LOCK_DATA";
- public static final String LOCKS = "$LOCKS";
-
/**
* Logger
*/
@@ -367,9 +368,6 @@
for (LockData lockData : getLockList())
{
- //TODO check is live or remove it
- //if (lockData.isLive())
- //{
// check is lock holder
if (lockTokenHolders.containsKey(session.getId())
&& lockTokenHolders.get(session.getId()).contains(lockData.getToken()))
@@ -405,14 +403,7 @@
this.removeLockToken(session.getId(), lockData.getToken());
}
}
- //TODO
- // }
- // else
- // {
- // entries.remove();
- // }
}
-
}
/*
@@ -910,4 +901,14 @@
return null;
}
}
+
+ public boolean isLockLive(String nodeId)
+ {
+ if (pendingLocks.containsKey(nodeId) || lockRoot.hasChild(Fqn.fromString(nodeId)))
+ {
+ return true;
+ }
+
+ return false;
+ }
}
16 years, 6 months
exo-jcr SVN: r1416 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-15 10:02:55 -0500 (Fri, 15 Jan 2010)
New Revision: 1416
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
Log:
EXOJCR-331 : update configuration
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-15 14:55:12 UTC (rev 1415)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-15 15:02:55 UTC (rev 1416)
@@ -85,7 +85,7 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
+ <property name="maxNodes" value="10000" />
<property name="timeToLive" value="120000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-15 14:55:12 UTC (rev 1415)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-15 15:02:55 UTC (rev 1416)
@@ -85,7 +85,7 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
+ <property name="maxNodes" value="10000" />
<property name="timeToLive" value="120000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-15 14:55:12 UTC (rev 1415)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-15 15:02:55 UTC (rev 1416)
@@ -72,7 +72,7 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
+ <property name="maxNodes" value="10000" />
<property name="timeToLive" value="120000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-15 14:55:12 UTC (rev 1415)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-15 15:02:55 UTC (rev 1416)
@@ -72,7 +72,7 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
+ <property name="maxNodes" value="10000" />
<property name="timeToLive" value="120000" />
</default>
</eviction>
16 years, 6 months