[jboss-cvs] JBossAS SVN: r61118 - trunk/cluster/src/main/org/jboss/ha/singleton.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 6 00:30:06 EST 2007


Author: bstansberry at jboss.com
Date: 2007-03-06 00:30:06 -0500 (Tue, 06 Mar 2007)
New Revision: 61118

Modified:
   trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonElectionPolicyMBean.java
   trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java
   trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupportMBean.java
Log:
[JBAS-4179] Update interfaces for HASingletonEvictionPolicy

Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonElectionPolicyMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonElectionPolicyMBean.java	2007-03-06 04:40:32 UTC (rev 61117)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonElectionPolicyMBean.java	2007-03-06 05:30:06 UTC (rev 61118)
@@ -22,8 +22,6 @@
 package org.jboss.ha.singleton;
 
 
-import org.jboss.ha.framework.interfaces.ClusterNode;
-import org.jboss.ha.framework.interfaces.HAPartition;
 
 /** 
  *   Management Bean for HASinigleton Election Policy.
@@ -33,50 +31,6 @@
  *
  */
 public interface HASingletonElectionPolicyMBean 
-   extends org.jboss.system.ServiceMBean
-{
-   /**
-    * Called by the HASingleton to provide the election policy a reference to 
-    * itself.  A policy that was designed to elect a particular kind of singleton
-    * could downcast this object to a particular type and then access the
-    * singleton for state information needed for the election decision.
-    */
-   void setManagedSingleton(Object singleton);
-   Object getManagedSingleton();
-
-   /**
-    * Sets the HAPartition; from this the election policy can gain
-    * access to the DistributedReplicantManager for tracking the 
-    * deployment topology for the singleton service and to the HAPartition 
-    * for making group RPC calls.
-    */
-   void setHAPartition(HAPartition partition);
-   HAPartition getHAPartition();
-
-   /**
-    * Return the elected master node.
-    * @return the master node
-    */
-   ClusterNode pickSingleton();
-   
-   /**
-    * Given the HAPartition, return the elected master node.
-    * @param partition
-    * @return the master node
-    */
-   ClusterNode pickSingleton(HAPartition partition);
-   
-   /**
-    * Conducts an election and returns whether the managed service
-    * is the master, based on the current view of partition.
-    * @return true only if the managed service is the master
-    */
-   public boolean isElectedMaster();
-   
-   /**
-    * Given the HAPartition, return whether the managed service is the master.
-    * @param partition
-    * @return true only if the managed service is the master
-    */
-   public boolean isElectedMaster(HAPartition partition); 
+   extends org.jboss.system.ServiceMBean, HASingletonElectionPolicy
+{ 
 }

Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java	2007-03-06 04:40:32 UTC (rev 61117)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupport.java	2007-03-06 05:30:06 UTC (rev 61118)
@@ -41,7 +41,7 @@
    // Private Data --------------------------------------------------
    
    private boolean isMasterNode = false;
-   private HASingletonElectionPolicyMBean mElectionPolicyMB = null;
+   private HASingletonElectionPolicy mElectionPolicyMB = null;
 
    // Constructors --------------------------------------------------
    
@@ -66,17 +66,17 @@
    }
 
    /**
-    * @see HASingletonSupportMBean#setHASingletonElectionPolicyMBean(HASingletonElectionPolicyMBean)
+    * @see HASingletonSupportMBean#setElectionPolicy(HASingletonElectionPolicyMBean)
     */
-   public void setHASingletonElectionPolicyMBean(HASingletonElectionPolicyMBean mb)
+   public void setElectionPolicy(HASingletonElectionPolicy mb)
    {
       this.mElectionPolicyMB = mb;
    }
    
    /**
-    * @see HASingletonSupportMBean#getHASingletonElectionPolicyMBean()
+    * @see HASingletonSupportMBean#getElectionPolicy()
     */
-   public HASingletonElectionPolicyMBean getHASingletonElectionPolicyMBean()
+   public HASingletonElectionPolicy getElectionPolicy()
    {
       return this.mElectionPolicyMB;
    }

Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupportMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupportMBean.java	2007-03-06 04:40:32 UTC (rev 61117)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonSupportMBean.java	2007-03-06 05:30:06 UTC (rev 61118)
@@ -30,6 +30,6 @@
 public interface HASingletonSupportMBean extends HASingletonMBean 
 {
    /** The HASingleton election policy MBean */
-   void setHASingletonElectionPolicyMBean(HASingletonElectionPolicyMBean mb);
-   HASingletonElectionPolicyMBean getHASingletonElectionPolicyMBean();
+   void setElectionPolicy(HASingletonElectionPolicy mb);
+   HASingletonElectionPolicy getElectionPolicy();
 }




More information about the jboss-cvs-commits mailing list