[jboss-cvs] JBossCache/src/org/jboss/cache/buddyreplication ...
Manik Surtani
msurtani at jboss.com
Thu Oct 12 19:03:58 EDT 2006
User: msurtani
Date: 06/10/12 19:03:58
Modified: src/org/jboss/cache/buddyreplication BuddyManager.java
Log:
a LOT of changes around Regions, in an attempt to unify eviction and marshalling regions
Revision Changes Path
1.45 +6 -7 JBossCache/src/org/jboss/cache/buddyreplication/BuddyManager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BuddyManager.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/buddyreplication/BuddyManager.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- BuddyManager.java 5 Oct 2006 22:19:37 -0000 1.44
+++ BuddyManager.java 12 Oct 2006 23:03:58 -0000 1.45
@@ -14,13 +14,12 @@
import org.jboss.cache.AbstractCacheListener;
import org.jboss.cache.CacheException;
import org.jboss.cache.Fqn;
+import org.jboss.cache.Region;
import org.jboss.cache.TreeCache;
import org.jboss.cache.lock.TimeoutException;
import org.jboss.cache.marshall.MethodCall;
import org.jboss.cache.marshall.MethodCallFactory;
import org.jboss.cache.marshall.MethodDeclarations;
-import org.jboss.cache.marshall.Region;
-import org.jboss.cache.marshall.RegionManager;
import org.jboss.cache.marshall.VersionAwareMarshaller;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.xml.XmlHelper;
@@ -32,6 +31,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -528,13 +528,12 @@
byte[] state = null;
if (cache.getConfiguration().isUseRegionBasedMarshalling())
{
- RegionManager rm = cache.getRegionManager();
- Region[] regions = rm.getRegions();
- if (regions.length > 0)
+ Collection<Region> regions = cache.getRegionManager().getAllMarshallingRegions();
+ if (regions.size() > 0)
{
- for (int i = 0; i < regions.length; i++)
+ for (Region r : regions)
{
- Fqn f = Fqn.fromString(regions[i].getFqn());
+ Fqn f = r.getFqn();
state = acquireState(f);
if (state != null)
{
More information about the jboss-cvs-commits
mailing list