JBoss Cache SVN: r8183 - in core/trunk/src/main/java/org/jboss/cache: commands/remote and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2009-08-15 18:25:40 -0400 (Sat, 15 Aug 2009)
New Revision: 8183
Modified:
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
Log:
[JBCACHE-1530] Attempt to clean defunct data backup regions if DataGravitationCleanupCommand comes in recently after the region was created
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2009-08-14 19:31:20 UTC (rev 8182)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2009-08-15 22:25:40 UTC (rev 8183)
@@ -80,6 +80,7 @@
import java.util.Vector;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
@@ -175,6 +176,8 @@
private boolean receivedBuddyInfo;
private DataContainer dataContainer;
private BuddyFqnTransformer buddyFqnTransformer;
+
+ private ConcurrentMap<String, Set<DefunctDataHistory>> defunctDataHistory = new ConcurrentHashMap<String, Set<DefunctDataHistory>>();
public BuddyManager()
{
@@ -713,6 +716,50 @@
}
return owners;
}
+
+ public List<Fqn<?>> getNewlyDeadBackupFqns(Fqn<?> backupFqn)
+ {
+ if (buddyFqnTransformer.isDeadBackupFqn(backupFqn))
+ {
+ return null;
+ }
+
+ if (!buddyFqnTransformer.isBackupFqn(backupFqn) || backupFqn.size() < BUDDY_BACKUP_SUBTREE_FQN.size() + 2)
+ {
+ return null;
+ }
+
+ List<Fqn<?>> result = null;
+ String owner = (String) backupFqn.get(BUDDY_BACKUP_SUBTREE_FQN.size());
+ Set<DefunctDataHistory> historySet = defunctDataHistory.get(owner);
+ if (historySet != null)
+ {
+ Fqn<?> coreFqn = null;
+ for (Iterator<DefunctDataHistory> it = historySet.iterator(); it.hasNext(); )
+ {
+ DefunctDataHistory gen = it.next();
+ if (gen.isStale())
+ {
+ it.remove();
+ }
+ else
+ {
+ if (result == null)
+ {
+ result = new ArrayList<Fqn<?>>();
+ }
+ if (coreFqn == null)
+ {
+ coreFqn = buddyFqnTransformer.getActualFqn(backupFqn);
+ }
+ Fqn<?> base = Fqn.fromRelativeElements(BUDDY_BACKUP_SUBTREE_FQN, gen.owner, Integer.valueOf(gen.generation));
+ result.add(Fqn.fromRelativeFqn(base, coreFqn));
+ }
+ }
+ }
+
+ return result;
+ }
// -------------- static util methods ------------------
@@ -1102,15 +1149,29 @@
{
Fqn defunctBackupRootFqn = getDefunctBackupRootFqn(dataOwner);
- if (trace) log.trace("Migrating defunct data. Backup root is " + backupRoot);
+ if (log.isDebugEnabled()) log.debug("Migrating defunct data. Backup root is " + backupRoot + ". New backup root is " + defunctBackupRootFqn);
if (trace) log.trace("Children of backup root are " + backupRoot.getChildren());
+ String ownerName = buddyFqnTransformer.getGroupNameFromAddress(dataOwner);
+
+ Set<DefunctDataHistory> newHistorySet = new ConcurrentHashSet<DefunctDataHistory>();
+ Set<DefunctDataHistory> historySet = defunctDataHistory.putIfAbsent(ownerName, newHistorySet);
+ if (historySet == null)
+ {
+ historySet = newHistorySet;
+ }
+
+ DefunctDataHistory history = new DefunctDataHistory(ownerName, (Integer) defunctBackupRootFqn.getLastElement(), System.currentTimeMillis());
+ historySet.add(history);
+
for (Object child : backupRoot.getChildren())
{
Fqn childFqn = ((Node) child).getFqn();
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
cache.move(childFqn, defunctBackupRootFqn);
}
+
+ history.recordDataMoved();
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
backupRoot.getParentDirect().removeChild(backupRoot.getFqn().getLastElement());
@@ -1323,4 +1384,36 @@
{
return buddyGroupsIParticipateIn.toString();
}
+
+ private class DefunctDataHistory
+ {
+ private final String owner;
+ private final int generation;
+ private final long timestamp;
+ private long dataMoved;
+ private long moveElapsedTime;
+
+ private DefunctDataHistory(String owner, int generation, long timestamp)
+ {
+ this.owner = owner;
+ this.generation = generation;
+ this.timestamp = timestamp;
+ }
+
+ private void recordDataMoved()
+ {
+ this.dataMoved = System.currentTimeMillis();
+ this.moveElapsedTime = this.dataMoved - this.timestamp;
+ }
+
+ private boolean isStale()
+ {
+ if (dataMoved == 0)
+ return false;
+
+ long max = Math.max(BuddyManager.this.configuration.getLockAcquisitionTimeout(), 60000);
+ max = max + moveElapsedTime;
+ return System.currentTimeMillis() - max < dataMoved;
+ }
+ }
}
\ No newline at end of file
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2009-08-14 19:31:20 UTC (rev 8182)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2009-08-15 22:25:40 UTC (rev 8183)
@@ -105,20 +105,23 @@
Object result = executeRemove(gtx, backup);
if (wasNodeRemoved(result))
{
- // if this is a DIRECT child of a DEAD buddy backup region, then remove the empty dead region structural node.
- Fqn deadBackupRootFqn = null;
- if (buddyFqnTransformer.isDeadBackupFqn(backup) && buddyFqnTransformer.isDeadBackupRoot(backup.getAncestor(backup.size() - 2))
- && !dataContainer.hasChildren((deadBackupRootFqn = backup.getParent())))
+ cleanEmptyDeadRegion(gtx, backup);
+ }
+ else
+ {
+ // JBCACHE-1530 -- check for race where node was moved to a
+ // xxx:DEAD region just after we returned it as a GravitateResult
+ List<Fqn<?>> deadFqns = buddyManager.getNewlyDeadBackupFqns(backup);
+ if (deadFqns != null)
{
- if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
- executeRemove(gtx, deadBackupRootFqn);
-
- // now check the grand parent and see if we are free of versions
- deadBackupRootFqn = deadBackupRootFqn.getParent();
- if (!dataContainer.hasChildren(deadBackupRootFqn))
+ for (Fqn<?> dead : deadFqns)
{
- if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
- executeRemove(gtx, deadBackupRootFqn);
+ result = executeRemove(gtx, dead);
+ if (wasNodeRemoved(result))
+ {
+ cleanEmptyDeadRegion(gtx, dead);
+ break;
+ }
}
}
}
@@ -138,6 +141,26 @@
return null;
}
+ private void cleanEmptyDeadRegion(GlobalTransaction gtx, Fqn backupFqn) throws Throwable
+ {
+ // if this is a DIRECT child of a DEAD buddy backup region, then remove the empty dead region structural node.
+ Fqn deadBackupRootFqn = null;
+ if (buddyFqnTransformer.isDeadBackupFqn(backupFqn) && buddyFqnTransformer.isDeadBackupRoot(backup.getAncestor(backupFqn.size() - 2))
+ && !dataContainer.hasChildren((deadBackupRootFqn = backupFqn.getParent())))
+ {
+ if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
+ executeRemove(gtx, deadBackupRootFqn);
+
+ // now check the grand parent and see if we are free of versions
+ deadBackupRootFqn = deadBackupRootFqn.getParent();
+ if (!dataContainer.hasChildren(deadBackupRootFqn))
+ {
+ if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
+ executeRemove(gtx, deadBackupRootFqn);
+ }
+ }
+ }
+
/**
* Returns true if such a node was removed.
*/
15 years, 4 months
JBoss Cache SVN: r8182 - in core/trunk/src/main/java/org/jboss/cache: interceptors and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2009-08-14 15:31:20 -0400 (Fri, 14 Aug 2009)
New Revision: 8182
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java
Log:
[JBCACHE-1530] Give preference to non-DEAD owner backup data
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2009-08-11 11:35:33 UTC (rev 8181)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2009-08-14 19:31:20 UTC (rev 8182)
@@ -38,6 +38,7 @@
import org.jboss.cache.marshall.NodeData;
import org.jgroups.Address;
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
@@ -121,7 +122,9 @@
Set allGroupNames = getBackupRoots();
if (allGroupNames != null)
{
- for (Object groupName : allGroupNames)
+ // JBCACHE-1530 -- give preference to non-dead owners
+ List<Object> sortedGroupNames = sortBackupRoots(allGroupNames);
+ for (Object groupName : sortedGroupNames)
{
// groupName is the name of a buddy group since all child names in this
// collection are direct children of BUDDY_BACKUP_SUBTREE_FQN
@@ -214,6 +217,24 @@
return backupSubtree.getChildrenNames();
}
+ protected List<Object> sortBackupRoots(Set<Object> allGroupNames)
+ {
+ List<Object> sorted = new ArrayList<Object>(allGroupNames.size());
+ for (Object child : allGroupNames)
+ {
+ if (child instanceof String && ((String) child).endsWith(":DEAD") == false)
+ {
+ sorted.add(0, child);
+ }
+ else
+ {
+ sorted.add(child);
+ }
+
+ }
+ return sorted;
+ }
+
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
return visitor.visitGravitateDataCommand(ctx, this);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java 2009-08-11 11:35:33 UTC (rev 8181)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java 2009-08-14 19:31:20 UTC (rev 8182)
@@ -52,6 +52,7 @@
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.RspFilter;
+import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -378,10 +379,10 @@
}
else if (o instanceof GravitateResult)
{
- result = (GravitateResult) o;
- if (result.isDataFound())
+ GravitateResult candidate = (GravitateResult) o;
+ if (isPreferable(candidate, result))
{
- break;
+ result = candidate;
}
}
else if (o == null)
@@ -404,6 +405,88 @@
return result;
}
+ /**
+ * JBCACHE-1530. Compares GravitateResults in order to prefer those not
+ * from dead owner trees.
+ *
+ * @param candidate a result that might be preferable to <code>existing</code.
+ * Cannot be <code>null</code>
+ * @param existing the currently preferred result. Cannot be <code>null</code>
+ *
+ * @return <code>true</code> if <code>candidate</code> is preferable.
+ */
+ private boolean isPreferable(GravitateResult candidate, GravitateResult existing)
+ {
+ if (existing.isDataFound() == false)
+ {
+ return true;
+ }
+ else if (candidate.isDataFound() == false)
+ {
+ return false;
+ }
+ else
+ {
+ int ownerIndex = BuddyManager.BUDDY_BACKUP_SUBTREE_FQN.size();
+
+ Fqn<?> existingFqn = existing.getBuddyBackupFqn();
+ String existingOwner = (existingFqn.size() > ownerIndex ? (String) existingFqn.get(ownerIndex) : null);
+ if (existingOwner == null)
+ {
+ return true;
+ }
+
+ boolean existingDead = existingOwner.endsWith(":DEAD");
+
+ Fqn<?> candidateFqn = candidate.getBuddyBackupFqn();
+ String candidateOwner = (candidateFqn.size() > ownerIndex ? (String) candidateFqn.get(ownerIndex) : null);
+ if (candidateOwner == null)
+ {
+ log.warn("Could not find a data owner in backupFqn from " + candidate);
+ return false;
+ }
+ else if (candidateOwner.endsWith(":DEAD"))
+ {
+ if (existingDead)
+ {
+ // Both are dead. See if generational match matters
+ if (candidateOwner.equals(existingOwner))
+ {
+ int genIndex = ownerIndex + 1;
+ Object existGen = (existingFqn.size() > genIndex ? existingFqn.get(genIndex) : null);
+ if ((existGen instanceof Integer) == false)
+ {
+ return true;
+ }
+ Object candGen = (candidateFqn.size() > genIndex ? candidateFqn.get(genIndex) : null);
+ if ((candGen instanceof Integer) == false)
+ {
+ log.warn("Could not find a dead data owner generation in backupFqn from " + candidate);
+ return false;
+ }
+ return ((Integer) candGen).intValue() > ((Integer) existGen).intValue();
+ }
+ else
+ {
+ // No poing comparing generations of different dead owners
+ // Just prefer what we already have
+ return false;
+ }
+ }
+ else
+ {
+ // Prefer non-dead existing
+ return false;
+ }
+ }
+ else
+ {
+ // Candidate isn't dead but we prefer what we already have if it's not dead
+ return existingDead;
+ }
+ }
+ }
+
@SuppressWarnings("unchecked")
private void createNode(List<NodeData> nodeData) throws CacheException
{
@@ -488,4 +571,42 @@
return memberCount > 1;
}
}
+
+ private static class GravitationResponseComparator implements Comparator<Object>
+ {
+ public int compare(Object o1, Object o2)
+ {
+ if (o1 instanceof GravitateResult)
+ {
+ if (o2 instanceof GravitateResult)
+ {
+ GravitateResult g2 = (GravitateResult) o2;
+ if (g2.isDataFound() == false)
+ {
+ return -1;
+ }
+ else
+ {
+ return comparePositiveResults((GravitateResult) o1, g2);
+ }
+ }
+ else
+ {
+ return -1; // put GR before non-GR
+ }
+ }
+ else
+ {
+ return 1; // put misc stuff at the end
+ }
+ }
+
+ private int comparePositiveResults(GravitateResult g1, GravitateResult g2)
+ {
+ Fqn<?> f1 = g1.getBuddyBackupFqn();
+ Fqn<?> f2 = g2.getBuddyBackupFqn();
+ return -1;
+ }
+
+ }
}
15 years, 4 months
JBoss Cache SVN: r8181 - in core/trunk/src/main/java/org/jboss/cache: config/parsing and 5 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-08-11 07:35:33 -0400 (Tue, 11 Aug 2009)
New Revision: 8181
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java
core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java
core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java
core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java
Log:
Code cleanup
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -31,7 +31,6 @@
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.interceptors.InterceptorChain;
-import org.jboss.cache.loader.CacheLoaderManager;
import java.util.ArrayList;
import java.util.Collections;
@@ -55,7 +54,6 @@
private boolean searchBackupSubtrees;
private DataContainer dataContainer;
private InterceptorChain interceptorChain;
- private CacheLoaderManager clm;
private static final Log log = LogFactory.getLog(ClusteredGetCommand.class);
private static final boolean trace = log.isTraceEnabled();
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -519,7 +519,7 @@
}
catch (NoSuchMethodException me)
{
- // try other setters that may fit later on. Don't throw this exception though.
+ // try other setters that may fit later on. Don't throw this exception though.
}
catch (Exception e)
{
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -107,7 +107,7 @@
public boolean equals(Object o)
{
if (this == o) return true;
- if (!(o instanceof EvictionAlgorithmConfigBase)) return false;
+ if (!(o.getClass().equals(getClass()))) return false;
EvictionAlgorithmConfigBase that = (EvictionAlgorithmConfigBase) o;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -100,7 +100,7 @@
public boolean equals(Object o)
{
if (this == o) return true;
- if (!(o instanceof EvictionPolicyConfigBase)) return false;
+ if (!(o.getClass().equals(getClass()))) return false;
EvictionPolicyConfigBase that = (EvictionPolicyConfigBase) o;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -72,12 +72,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof FIFOAlgorithmConfig && super.equals(obj));
- }
-
- @Override
public void reset()
{
super.reset();
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -89,12 +89,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof FIFOConfiguration && super.equals(obj));
- }
-
- @Override
protected void setEvictionPolicyClassName()
{
setEvictionPolicyClass(FIFOPolicy.class.getName());
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -72,12 +72,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof MRUAlgorithmConfig && super.equals(obj));
- }
-
- @Override
public void reset()
{
super.reset();
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -93,12 +93,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof MRUConfiguration && super.equals(obj));
- }
-
- @Override
public void reset()
{
setMaxNodes(-1);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -230,10 +230,9 @@
private boolean childrenLoaded(NodeSPI<?, ?> node) throws Exception
{
- if (!node.isChildrenLoaded())
- {
- if (loader.getChildrenNames(node.getFqn()) != null) return false;
- }
+ if (!node.isChildrenLoaded() && loader.getChildrenNames(node.getFqn()) != null)
+ return false;
+
for (NodeSPI child : node.getChildrenDirect())
{
if (!child.isDataLoaded())
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -346,17 +346,6 @@
}
/**
- * Retrieves a backup fqn in an array of arguments. This is typically used to parse arguments from a data gravitation cleanup method.
- *
- * @param args array of arguments to parse
- * @return an Fqn
- */
- private Fqn getBackupFqn(Object[] args)
- {
- return (Fqn) args[1];
- }
-
- /**
* Adds a method call to the modification list of a given transaction's transaction entry
*/
private void addToModificationList(WriteCommand command, InvocationContext ctx)
Modified: core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -21,25 +21,21 @@
*/
package org.jboss.cache.loader.jdbm;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
import jdbm.helper.Tuple;
import jdbm.helper.TupleBrowser;
import net.jcip.annotations.ThreadSafe;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheException;
import org.jboss.cache.Fqn;
-import org.jboss.cache.Modification;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
/**
* Optimized version of the {@link JdbmCacheLoader} implementation which is better
* for storing data under a single node. Speed is improved.
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -26,7 +26,6 @@
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.interceptors.InterceptorChain;
import org.jboss.cache.invocation.InvocationContextContainer;
-import org.jboss.cache.util.concurrent.ReclosableLatch;
import org.jgroups.Channel;
import org.jgroups.MembershipListener;
import org.jgroups.Message;
Modified: core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java 2009-08-11 11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java 2009-08-11 11:35:33 UTC (rev 8181)
@@ -22,9 +22,6 @@
package org.jboss.cache.transaction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.transaction.TransactionManager;
@@ -38,13 +35,8 @@
@Deprecated
public class BatchModeTransactionManagerLookup implements TransactionManagerLookup
{
- private Log log = LogFactory.getLog(BatchModeTransactionManagerLookup.class);
-
public TransactionManager getTransactionManager() throws Exception
{
- // (BES 2208/11/2) We decided to use JBC 3 in JBoss AS 5. Therefore
- // this is not a correct statement and I am removing this logging.
- //log.warn("Using a deprecated/unsupported transaction manager!");
return BatchModeTransactionManager.getInstance();
}
}
15 years, 4 months