fr.dyade.aaa.agent
Class JGroups

java.lang.Object
  extended by fr.dyade.aaa.agent.JGroups
All Implemented Interfaces:
org.jgroups.MembershipListener, org.jgroups.MessageListener

final class JGroups
extends java.lang.Object
implements org.jgroups.MembershipListener, org.jgroups.MessageListener

Implementation of JGroups in order to improve HA.


Field Summary
private  org.jgroups.Channel channel
           
private  java.lang.String channelName
           
(package private)  boolean coordinator
           
private  org.jgroups.Address coordinatorAddr
           
(package private)  HAEngine engine
           
(package private) static int INITIALIZING
           
(package private)  java.lang.Object lock
           
(package private) static org.objectweb.util.monolog.api.Logger logmon
           
private  org.jgroups.Address myAddr
           
private  int nbClusterExpected
           
(package private)  SimpleNetwork network
           
(package private) static int NONE
           
(package private) static int RUNNING
           
(package private) static int STARTING
           
(package private)  int state
           
 
Constructor Summary
JGroups()
           
 
Method Summary
 void block()
           
(package private)  void connect()
           
(package private)  void disconnect()
           
(package private)  org.jgroups.Address getCoordinatorAddr()
           
 byte[] getState()
           
(package private)  void init(short sid)
           
(package private)  boolean isCoordinator()
           
 void receive(org.jgroups.Message msg)
           
(package private)  void send(java.io.Serializable obj)
           
(package private)  void sendTo(org.jgroups.Address dst, java.io.Serializable obj)
           
(package private)  void setEngine(HAEngine engine)
           
(package private)  void setNetWork(SimpleNetwork network)
           
 void setState(byte[] state)
           
(package private)  void startConsAndServ()
           
 void suspect(org.jgroups.Address suspected_mbr)
           
 void viewAccepted(org.jgroups.View view)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logmon

static org.objectweb.util.monolog.api.Logger logmon

nbClusterExpected

private int nbClusterExpected

coordinator

boolean coordinator

channel

private org.jgroups.Channel channel

myAddr

private org.jgroups.Address myAddr

coordinatorAddr

private org.jgroups.Address coordinatorAddr

channelName

private java.lang.String channelName

engine

HAEngine engine

network

SimpleNetwork network

lock

java.lang.Object lock

state

int state

NONE

static final int NONE
See Also:
Constant Field Values

STARTING

static final int STARTING
See Also:
Constant Field Values

INITIALIZING

static final int INITIALIZING
See Also:
Constant Field Values

RUNNING

static final int RUNNING
See Also:
Constant Field Values
Constructor Detail

JGroups

JGroups()
  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

init

void init(short sid)
    throws java.lang.Exception
Throws:
java.lang.Exception

disconnect

void disconnect()

connect

void connect()
       throws org.jgroups.ChannelException,
              org.jgroups.ChannelClosedException
Throws:
org.jgroups.ChannelException
org.jgroups.ChannelClosedException

startConsAndServ

void startConsAndServ()

send

void send(java.io.Serializable obj)
    throws java.lang.Exception
Throws:
java.lang.Exception

sendTo

void sendTo(org.jgroups.Address dst,
            java.io.Serializable obj)
      throws java.lang.Exception
Throws:
java.lang.Exception

getCoordinatorAddr

org.jgroups.Address getCoordinatorAddr()

setEngine

void setEngine(HAEngine engine)

setNetWork

void setNetWork(SimpleNetwork network)

isCoordinator

boolean isCoordinator()

receive

public void receive(org.jgroups.Message msg)
Specified by:
receive in interface org.jgroups.MessageListener

getState

public byte[] getState()
Specified by:
getState in interface org.jgroups.MessageListener

setState

public void setState(byte[] state)
Specified by:
setState in interface org.jgroups.MessageListener

viewAccepted

public void viewAccepted(org.jgroups.View view)
Specified by:
viewAccepted in interface org.jgroups.MembershipListener

suspect

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

block

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


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.