[jboss-cvs] JBossCache/src/org/jboss/cache/buddyreplication ...
Manik Surtani
manik at jboss.org
Mon Apr 23 10:52:29 EDT 2007
User: msurtani
Date: 07/04/23 10:52:29
Modified: src/org/jboss/cache/buddyreplication BuddyManager.java
Log:
Removed obsolete method (StateTransferManager.loadState()) and rewrote tests that depended on it. Also javadoc'd BuddyManager static util methods.
Revision Changes Path
1.73 +30 -3 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.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- BuddyManager.java 18 Mar 2007 23:17:12 -0000 1.72
+++ BuddyManager.java 23 Apr 2007 14:52:29 -0000 1.73
@@ -479,7 +479,26 @@
// -------------- static util methods ------------------
- public static Fqn getBackupFqn(Object buddyGroupName, Fqn origFqn)
+ /**
+ * Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the data owner's Address.
+ *
+ * @param dataOwnerAddress the JGroups {@link org.jgroups.Address} of the data owner
+ * @param origFqn the original Fqn
+ * @return a backup Fqn
+ */
+ public static Fqn getBackupFqn(Address dataOwnerAddress, Fqn origFqn)
+ {
+ return getBackupFqn(getGroupNameFromAddress(dataOwnerAddress), origFqn);
+ }
+
+ /**
+ * Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the buddy group name.
+ *
+ * @param buddyGroupName the buddy group name
+ * @param origFqn the original Fqn
+ * @return a backup Fqn
+ */
+ public static Fqn getBackupFqn(String buddyGroupName, Fqn origFqn)
{
if (isBackupFqn(origFqn))
throw new CacheException("Cannot make a backup Fqn from a backup Fqn! Attempting to create a backup of " + origFqn);
@@ -491,6 +510,14 @@
return new Fqn(elements);
}
+ /**
+ * Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the backup subtree for the
+ * buddy group in question
+ *
+ * @param buddyGroupRoot the subtree under which data for a particular buddy is backed up
+ * @param origFqn the original Fqn
+ * @return a backup Fqn
+ */
public static Fqn getBackupFqn(Fqn buddyGroupRoot, Fqn origFqn)
{
if (origFqn.isChildOf(buddyGroupRoot))
More information about the jboss-cvs-commits
mailing list