org.exist.cluster
Class ClusterComunication

java.lang.Object
  extended byorg.exist.cluster.ClusterComunication
All Implemented Interfaces:
org.jgroups.MembershipListener

public class ClusterComunication
extends java.lang.Object
implements org.jgroups.MembershipListener

Manage the Cluster communication via RPC JGroups Created by Nicola Breda.

Author:
Nicola Breda aka maiale, David Frontini aka spider Date: 05-aug-2005 Time: 18.09.08 Revision $Revision: 2134 $

Field Summary
static java.lang.String DEFAULT_PROTOCOL_STACK
           
 
Method Summary
 void addCollection(java.lang.String parent, java.lang.String collectionName)
           
 void block()
           
static void configure(Configuration c)
          Configure the cluster communication
 org.jgroups.Address getAddress()
           
 Configuration getConfiguration()
           
 java.util.HashMap getConsoleInfos(java.util.Vector address)
           
 ConsoleInfo getConsoleProperties()
           
 org.jgroups.Address getCoordinator()
           
static java.lang.String getDbaPwd()
           
static java.lang.String getDbaUser()
           
 int[][] getHeaders()
           
static ClusterComunication getInstance()
          ********** --------------------------------------------------------- **********
 java.util.Vector getMembersNoCoordinator()
           
 int[] getNextDataRemote(java.lang.String address)
           
 java.util.ArrayList getNextEvents(int[] header, int[] myHeader, java.lang.Integer start)
           
 int[] getRemoteHeader()
           
 void invoke(ClusterEvent event)
           
 boolean isCoordinator()
          ************** --------- CONSOLE METHODS ---------- *******************************
 void removeCollection(java.lang.String parent, java.lang.String collection)
           
 void removeDocument(java.lang.String collection, java.lang.String documentName)
           
 void stop()
           
 void storeDocument(java.lang.String collection, java.lang.String documentName, java.lang.String content)
           
 void suspect(org.jgroups.Address address)
           
 void synch()
           
 void update(java.lang.String resource, java.lang.String name, java.lang.String xupdate)
           
 void viewAccepted(org.jgroups.View view)
          ---------------- MEMBERSHIP LISTENER METHODS ------------------------------ ****
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROTOCOL_STACK

public static final java.lang.String DEFAULT_PROTOCOL_STACK
See Also:
Constant Field Values
Method Detail

getDbaUser

public static java.lang.String getDbaUser()

getDbaPwd

public static java.lang.String getDbaPwd()

viewAccepted

public void viewAccepted(org.jgroups.View view)
---------------- MEMBERSHIP LISTENER METHODS ------------------------------ ****

Specified by:
viewAccepted in interface org.jgroups.MembershipListener

suspect

public void suspect(org.jgroups.Address address)
Specified by:
suspect in interface org.jgroups.MembershipListener

block

public void block()
Specified by:
block in interface org.jgroups.MembershipListener

getInstance

public static ClusterComunication getInstance()
********** --------------------------------------------------------- **********


isCoordinator

public boolean isCoordinator()
************** --------- CONSOLE METHODS ---------- *******************************


getCoordinator

public org.jgroups.Address getCoordinator()

getAddress

public org.jgroups.Address getAddress()

getMembersNoCoordinator

public java.util.Vector getMembersNoCoordinator()

getConsoleInfos

public java.util.HashMap getConsoleInfos(java.util.Vector address)

getHeaders

public int[][] getHeaders()
                   throws ClusterException
Throws:
ClusterException

getConfiguration

public Configuration getConfiguration()

configure

public static void configure(Configuration c)
                      throws ClusterException
Configure the cluster communication

Parameters:
c -
Throws:
ClusterException

synch

public void synch()
           throws ClusterException
Throws:
ClusterException

removeDocument

public void removeDocument(java.lang.String collection,
                           java.lang.String documentName)
                    throws ClusterException
Throws:
ClusterException

storeDocument

public void storeDocument(java.lang.String collection,
                          java.lang.String documentName,
                          java.lang.String content)
                   throws ClusterException
Throws:
ClusterException

addCollection

public void addCollection(java.lang.String parent,
                          java.lang.String collectionName)
                   throws ClusterException
Throws:
ClusterException

update

public void update(java.lang.String resource,
                   java.lang.String name,
                   java.lang.String xupdate)
            throws ClusterException
Throws:
ClusterException

removeCollection

public void removeCollection(java.lang.String parent,
                             java.lang.String collection)
                      throws ClusterException
Throws:
ClusterException

getNextEvents

public java.util.ArrayList getNextEvents(int[] header,
                                         int[] myHeader,
                                         java.lang.Integer start)

getNextDataRemote

public int[] getNextDataRemote(java.lang.String address)

invoke

public void invoke(ClusterEvent event)
            throws ClusterException
Throws:
ClusterException

getRemoteHeader

public int[] getRemoteHeader()
                      throws ClusterException
Throws:
ClusterException

getConsoleProperties

public ConsoleInfo getConsoleProperties()
                                 throws ClusterException
Throws:
ClusterException

stop

public void stop()


Copyright (C) Wolfgang Meier. All rights reserved.