org.apache.geronimo.clustering
Class Cluster

java.lang.Object
  extended byorg.apache.geronimo.clustering.MBeanImpl
      extended byorg.apache.geronimo.clustering.NamedMBeanImpl
          extended byorg.apache.geronimo.clustering.Cluster
Direct Known Subclasses:
LocalCluster

public abstract class Cluster
extends NamedMBeanImpl

A 'Cluster' is a point of connection between all 'Cluster's with the same name, running in other VMs. I hope to support different types of cluster including (initially) SimpleCluster, in which every node replicates every other node and CleverCluster, which automagically partitions data into SubClusters etc...

Version:
$Revision: 1.12 $ $Date: 2004/03/10 09:58:21 $

Field Summary
protected  org.apache.commons.logging.Log _log
           
 
Fields inherited from class org.apache.geronimo.clustering.MBeanImpl
_objectName, _server
 
Constructor Summary
Cluster()
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
abstract  Data getData()
          Return the Object which this Cluster is responsible for maintaining via e.g.
abstract  List getMembers()
          Return current Cluster members.
abstract  void join(Object member)
          Add the given node to this Cluster.
abstract  void leave(Object member)
          Remove the given node from this Cluster.
static javax.management.ObjectName makeObjectName(String clusterName)
          Makes an ObjectName for a Cluster MBean with the given parameters.
 
Methods inherited from class org.apache.geronimo.clustering.NamedMBeanImpl
canStart, getName
 
Methods inherited from class org.apache.geronimo.clustering.MBeanImpl
canStop, getObjectName, getReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected org.apache.commons.logging.Log _log
Constructor Detail

Cluster

public Cluster()
Method Detail

makeObjectName

public static javax.management.ObjectName makeObjectName(String clusterName)
                                                  throws Exception
Makes an ObjectName for a Cluster MBean with the given parameters.

Parameters:
clusterName - a String value
Returns:
an ObjectName value
Throws:
Exception - if an error occurs

getMembers

public abstract List getMembers()
Return current Cluster members.

Returns:
a List value

getData

public abstract Data getData()
Return the Object which this Cluster is responsible for maintaining via e.g. replication.

Returns:
a Data value

join

public abstract void join(Object member)
Add the given node to this Cluster.

Parameters:
member - an Object value

leave

public abstract void leave(Object member)
Remove the given node from this Cluster.

Parameters:
member - an Object value

doStart

public void doStart()
Overrides:
doStart in class MBeanImpl

doStop

public void doStop()
Overrides:
doStop in class MBeanImpl

doFail

public void doFail()
Overrides:
doFail in class MBeanImpl


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.