[exo-jcr-commits] exo-jcr SVN: r1363 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: storage/jbosscache and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Jan 12 08:30:30 EST 2010
Author: nfilotto
Date: 2010-01-12 08:30:30 -0500 (Tue, 12 Jan 2010)
New Revision: 1363
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
Log:
EXOJCR-325: Remove the data from the Cache indexer once the data has been indexed to prevent memory leak
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2010-01-12 13:16:32 UTC (rev 1362)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2010-01-12 13:30:30 UTC (rev 1363)
@@ -90,8 +90,16 @@
}
// updating index
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)value;
- updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(), wrapper
- .getParentRemovedNodes());
+ try
+ {
+ updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(), wrapper
+ .getParentRemovedNodes());
+ }
+ finally
+ {
+ // remove the data from the cache
+ cache.removeNode(name);
+ }
}
return null;
}
@@ -99,11 +107,9 @@
/**
* @see org.exoplatform.services.jcr.impl.storage.jbosscache.AbstractWriteOnlyCacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
*/
- @Override
public void put(Fqn arg0, Map<Object, Object> arg1) throws Exception
{
// ignoring call cacheRoot.addChild(PARAMETER_ROOT).setResident(true);
-
}
/**
@@ -116,6 +122,14 @@
}
/**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn)
+ */
+ public void remove(Fqn arg0) throws Exception
+ {
+ // do nothing
+ }
+
+ /**
* Switches Indexer mode from RO to RW, or from RW to RO
*
* @param ioMode
@@ -199,5 +213,4 @@
}
}
}
-
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-01-12 13:16:32 UTC (rev 1362)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-01-12 13:30:30 UTC (rev 1363)
@@ -83,22 +83,6 @@
/**
* {@inheritDoc}
*/
- public void put(Fqn arg0, Map<Object, Object> arg1) throws Exception
- {
- throw new WriteOnlyCacheLoaderException("The method 'put(Fqn arg0, Map<Object, Object> arg1))' should not be called.");
- }
-
- /**
- * {@inheritDoc}
- */
- public void remove(Fqn arg0) throws Exception
- {
- throw new WriteOnlyCacheLoaderException("The method 'remove(Fqn arg0)' should not be called.");
- }
-
- /**
- * {@inheritDoc}
- */
public Object remove(Fqn arg0, Object arg1) throws Exception
{
throw new WriteOnlyCacheLoaderException("The method 'remove(Fqn arg0, Object arg1)' should not be called.");
More information about the exo-jcr-commits
mailing list