User: slaboure
Date: 01/11/26 04:12:10
Modified: src/main/org/jboss/ha/framework/interfaces
DistributedReplicantManager.java
Log:
Added javadoc comments. Removed unnecessary exceptions
Revision Changes Path
1.4 +46 -14
jbossmx/src/main/org/jboss/ha/framework/interfaces/DistributedReplicantManager.java
Index: DistributedReplicantManager.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/interfaces/DistributedReplicantManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DistributedReplicantManager.java 2001/11/01 04:14:22 1.3
+++ DistributedReplicantManager.java 2001/11/26 12:12:10 1.4
@@ -1,15 +1,22 @@
-package org.jboss.ha.framework.interfaces;
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ha.framework.interfaces;
+import
org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener;
+import java.io.Serializable;
import java.util.ArrayList;
-import java.io.Serializable;
/**
*
- * @author [EMAIL PROTECTED]
- * @author [EMAIL PROTECTED]
- * @version $Revision: 1.3 $
+ * @author <a href="mailto:[EMAIL PROTECTED]">Bill Burke</a>.
+ * @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>.
+ * @version $Revision: 1.4 $
*
* <p><b>Revisions:</b><br>
* <p><b>2001/10/31: marcf</b>
@@ -25,32 +32,57 @@
*/
public interface ReplicantListener
{
+ /**
+ * Callback called when the content/list of replicant for a given replicant
key has changed
+ * @param key The name of the key of the replicant that has changed
+ * @param newReplicants The list of new replicants for the give replicant key
+ */
public void replicantsChanged(String key, ArrayList newReplicants);
}
- public void registerListener(String key, ReplicantListener subscriber) throws
Exception;
- public void unregisterListener(String key, ReplicantListener subscriber) throws
Exception;
+ /**
+ * Subscribe a new listener {@link ReplicantListener} for replicants change
+ * @param key Name of the replicant, must be identical cluster-wide for all
identical replicants
+ * @param subscriber The subsribing {@link ReplicantListener}
+ */
+ public void registerListener(String key, ReplicantListener subscriber);
+ /**
+ * Unsubscribe a listener {@link ReplicantListener} that had subscribed for
replicants changes
+ * @param key Name of the replicant, must be identical cluster-wide for all
identical replicants
+ * @param subscriber The unsubscribing {@link ReplicantListener}
+ */
+ public void unregisterListener(String key, ReplicantListener subscriber);
// State binding methods
//
- /**
- * remove the entire key from the ReplicationService
- */
- public void remove(String key) throws Exception;;
/**
* Add a replicant, it will be attached to this cluster node
+ * @param key Replicant name. All replicas around the cluster must use the same
key name.
+ * @param replicant Local data of the replicant, that is, any serializable data
+ * @throws Exception Thrown if a cluster communication problem occurs
*/
public void add(String key, Serializable replicant) throws Exception;
/**
- * Lookup the replicant attached to this cluster node
+ * Remove the entire key from the ReplicationService
+ * @param key Name of the replicant
+ * @throws Exception Thrown if a cluster communication problem occurs
*/
- public Serializable lookupLocalReplicant(String key) throws Exception;
+ public void remove(String key) throws Exception;;
+
+ /**
+ * Lookup the replicant attached to this cluster node
+ * @param key The name of the replicant
+ * @return The local replicant for the give key name
+ */
+ public Serializable lookupLocalReplicant(String key);
/**
* Return a list of all replicants.
+ * @param key The replicant name
+ * @return An array of serialized replicants available around the cluster for
the given key
*/
- public ArrayList lookupReplicants(String key) throws Exception;
+ public ArrayList lookupReplicants(String key);
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development