org.jboss.ha.framework.server
Class ClusterPartition

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.ha.framework.server.ClusterPartition
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.ha.framework.interfaces.HAPartition, AsynchEventHandler.AsynchEventProcessor, ClusterPartitionMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean, org.jgroups.ExtendedMembershipListener, org.jgroups.MembershipListener

public class ClusterPartition
extends ServiceMBeanSupport
implements org.jgroups.ExtendedMembershipListener, org.jboss.ha.framework.interfaces.HAPartition, AsynchEventHandler.AsynchEventProcessor, ClusterPartitionMBean

HAPartition implementation based on a JGroups RpcDispatcher and a multiplexed JChannel.

Version:
$Revision: 89190 $
Author:
Sacha Labourey., Bill Burke., Scott.Stark@jboss.org, brian.stansberry@jboss.com, Galder ZamarreƱo

Nested Class Summary
static class ClusterPartition.NoHandlerForRPC
          Returned when an RPC call arrives for a service that isn't registered.
 
Nested classes/interfaces inherited from interface org.jboss.ha.framework.interfaces.HAPartition
org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipExtendedListener, org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener, org.jboss.ha.framework.interfaces.HAPartition.HAMembershipExtendedListener, org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener, org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer
 
Field Summary
static String DEFAULT_CACHE_CONFIG
           
protected  boolean isStateSet
          True if serviceState was initialized during start-up.
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.ha.framework.server.ClusterPartitionMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
ClusterPartition()
           
 
Method Summary
protected  void bind(String jndiName, Object who, Class<?> classType, Context ctx)
          Helper method that binds the partition in the JNDI tree.
 void block()
           
 void callAsynchMethodOnCluster(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf)
          This function is an abstraction of RpcDispatcher for asynchronous messages
 void callAsyncMethodOnNode(String serviceName, String methodName, Object[] args, Class[] types, long methodTimeout, org.jboss.ha.framework.interfaces.ClusterNode targetNode)
          Calls method on target node only.
 ArrayList callMethodOnCluster(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf)
          This function is an abstraction of RpcDispatcher.
 ArrayList callMethodOnCluster(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf, long methodTimeout, org.jboss.ha.framework.interfaces.ResponseFilter filter)
           
 ArrayList callMethodOnCluster(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf, org.jboss.ha.framework.interfaces.ResponseFilter filter)
           
 ArrayList callMethodOnCoordinatorNode(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf)
          Calls method on Cluster coordinator node only.
 ArrayList callMethodOnCoordinatorNode(String objName, String methodName, Object[] args, Class[] types, boolean excludeSelf, long methodTimeout)
          Calls method on Cluster coordinator node only.
 Object callMethodOnNode(String serviceName, String methodName, Object[] args, Class[] types, long methodTimeout, org.jboss.ha.framework.interfaces.ClusterNode targetNode)
          Calls method synchrounously on target node only.
protected  void createService()
           
protected  void destroyService()
           
protected  void fetchState()
           
 boolean getAllowSynchronousMembershipNotifications()
          Returns whether this partition will synchronously notify any HAPartition.HAMembershipListener of membership changes using the calling thread from the underlying group communications layer (e.g.
 boolean getBindIntoJndi()
           
 String getCacheConfigName()
          Gets the configuration name under which our cache is registered with the cache manager.
 org.jboss.ha.framework.server.spi.HAPartitionCacheHandler getCacheHandler()
           
 org.jgroups.ChannelFactory getChannelFactory()
           
 String getChannelStackName()
          Gets the name of the JGroups channel protocol stack configuration provided to the channel factory.
 org.jboss.ha.framework.interfaces.ClusterNode getClusterNode()
           
 org.jboss.ha.framework.interfaces.ClusterNode[] getClusterNodes()
           
 Vector<String> getCurrentView()
          Return the list of member nodes that built from the current view
 long getCurrentViewId()
           
 boolean getDeadlockDetection()
          Deprecated. will be removed in next major release
protected  Vector<org.jboss.ha.framework.interfaces.ClusterNode> getDeadMembers(Vector<org.jboss.ha.framework.interfaces.ClusterNode> oldMembers, Vector<org.jboss.ha.framework.interfaces.ClusterNode> newMembers)
          Helper method that returns a vector of dead members from two input vectors: new and old vectors of two views.
 org.jboss.ha.framework.interfaces.DistributedReplicantManager getDistributedReplicantManager()
          Access to the DistributedReplicantManager implementation
 DistributedReplicantManagerImpl getDistributedReplicantManagerImpl()
           
 org.jboss.ha.framework.interfaces.DistributedState getDistributedStateService()
          Access to the DistributedState implementation
 org.jboss.ha.framework.interfaces.HAPartition getHAPartition()
          Deprecated. 
 HAPartitionDependencyCreator getHaPartitionDependencyCreator()
           
 String getJGroupsVersion()
          The version of JGroups this is running on
 long getMethodCallTimeout()
          Gets the max time (in ms) to wait for synchronous group method calls (HAPartition.callMethodOnCluster(String, String, Object[], Class[], boolean))
protected  Vector<org.jboss.ha.framework.interfaces.ClusterNode> getNewMembers(Vector<org.jboss.ha.framework.interfaces.ClusterNode> oldMembers, Vector<org.jboss.ha.framework.interfaces.ClusterNode> allMembers)
          Helper method that returns a vector of new members from two input vectors: new and old vectors of two views.
 InetAddress getNodeAddress()
          The node address used to generate the node name
 String getNodeName()
          Uniquely identifies this node across the entire cluster.
 String getPartitionName()
          Name of the partition being built.
 long getStateTransferTimeout()
          Number of milliseconds to wait until state has been transferred, or zero to wait forever.
 org.jboss.util.threadpool.ThreadPool getThreadPool()
           
 boolean isCurrentNodeCoordinator()
           
 void logHistory(String message)
           
protected  void notifyListeners(ArrayList<org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener> theListeners, long viewID, Vector<org.jboss.ha.framework.interfaces.ClusterNode> allMembers, Vector<org.jboss.ha.framework.interfaces.ClusterNode> deadMembers, Vector<org.jboss.ha.framework.interfaces.ClusterNode> newMembers, Vector<org.jgroups.View> originatingGroups)
           
protected  Object objectFromByteBufferInternal(byte[] buffer)
          Creates an object from a byte buffer
protected  Object objectFromByteBufferResponseInternal(byte[] buffer)
          Creates a response object from a byte buffer - optimized for response marshalling
protected  byte[] objectToByteBufferInternal(Object obj)
          Serializes an object into a byte buffer.
protected  byte[] objectToByteBufferResponseInternal(Object obj)
          Serializes a response object into a byte buffer, optimized for response marshalling.
 void processEvent(Object event)
           
 void registerMembershipListener(org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener listener)
           
 void registerRPCHandler(String objName, Object subscriber)
           
 void registerRPCHandler(String objName, Object subscriber, ClassLoader classloader)
           
 void setAllowSynchronousMembershipNotifications(boolean allowSync)
          Sets whether this partition will synchronously notify any HAPartition.HAMembershipListener of membership changes using the calling thread from the underlying group communications layer (e.g.
 void setBindIntoJndi(boolean bind)
           
 void setCacheHandler(org.jboss.ha.framework.server.spi.HAPartitionCacheHandler cacheHandler)
           
 void setDeadlockDetection(boolean doit)
          Deprecated. will be removed in next major release
 void setDistributedStateImpl(org.jboss.ha.framework.interfaces.DistributedState distributedState)
           
 void setHaPartitionDependencyCreator(HAPartitionDependencyCreator haPartitionDependencyCreator)
           
 void setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext controllerContext)
           
 void setMethodCallTimeout(long timeout)
           
 void setNodeAddress(InetAddress address)
           
 void setPartitionName(String newName)
           
 void setStateTransferTimeout(long timeout)
           
 void setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)
           
 String showHistory()
          Gets a listing of significant events since the instantiation of this service (e.g.
 String showHistoryAsXML()
          Gets a listing of significant events since the instantiation of this service (e.g.
protected  void startService()
           
protected  void stopService()
           
 void subscribeToStateTransferEvents(String objectName, org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer subscriber)
           
 void suspect(org.jgroups.Address suspected_mbr)
           
protected  Vector<org.jboss.ha.framework.interfaces.ClusterNode> translateAddresses(Vector<org.jgroups.Address> addresses)
           
 void unblock()
           
 void unregisterMembershipListener(org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener listener)
           
 void unregisterRPCHandler(String objName, Object subscriber)
           
 void unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext controllerContext)
           
 void unsubscribeFromStateTransferEvents(String objectName, org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer subscriber)
           
protected  void verifyNodeIsUnique()
           
 void viewAccepted(org.jgroups.View newView)
          Notification of a cluster view change.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

DEFAULT_CACHE_CONFIG

public static final String DEFAULT_CACHE_CONFIG
See Also:
Constant Field Values

isStateSet

protected boolean isStateSet
True if serviceState was initialized during start-up.

Constructor Detail

ClusterPartition

public ClusterPartition()
Method Detail

createService

protected void createService()
                      throws Exception
Overrides:
createService in class ServiceMBeanSupport
Throws:
Exception

startService

protected void startService()
                     throws Exception
Overrides:
startService in class ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class ServiceMBeanSupport
Throws:
Exception

destroyService

protected void destroyService()
                       throws Exception
Overrides:
destroyService in class ServiceMBeanSupport
Throws:
Exception

fetchState

protected void fetchState()
                   throws Exception
Throws:
Exception

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

unblock

public void unblock()
Specified by:
unblock in interface org.jgroups.ExtendedMembershipListener

viewAccepted

public void viewAccepted(org.jgroups.View newView)
Notification of a cluster view change. This is done from the JG protocol handlder thread and we must be careful to not unduly block this thread. Because of this there are two types of listeners, synchronous and asynchronous. The synchronous listeners are messaged with the view change event using the calling thread while the asynchronous listeners are messaged using a seperate thread.

Specified by:
viewAccepted in interface org.jgroups.MembershipListener
Parameters:
newView -

getNodeName

public String getNodeName()
Description copied from interface: ClusterPartitionMBean
Uniquely identifies this node across the entire cluster. MUST be unique accros the whole cluster!

Specified by:
getNodeName in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getNodeName in interface ClusterPartitionMBean

getPartitionName

public String getPartitionName()
Description copied from interface: ClusterPartitionMBean
Name of the partition being built. All nodes/services belonging to a partition with the same name are clustered together.

Specified by:
getPartitionName in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getPartitionName in interface ClusterPartitionMBean

setPartitionName

public void setPartitionName(String newName)

getDistributedReplicantManager

public org.jboss.ha.framework.interfaces.DistributedReplicantManager getDistributedReplicantManager()
Description copied from interface: ClusterPartitionMBean
Access to the DistributedReplicantManager implementation

Specified by:
getDistributedReplicantManager in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getDistributedReplicantManager in interface ClusterPartitionMBean

getDistributedStateService

public org.jboss.ha.framework.interfaces.DistributedState getDistributedStateService()
Description copied from interface: ClusterPartitionMBean
Access to the DistributedState implementation

Specified by:
getDistributedStateService in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getDistributedStateService in interface ClusterPartitionMBean

getCurrentViewId

public long getCurrentViewId()
Specified by:
getCurrentViewId in interface org.jboss.ha.framework.interfaces.HAPartition

getCurrentView

public Vector<String> getCurrentView()
Description copied from interface: ClusterPartitionMBean
Return the list of member nodes that built from the current view

Specified by:
getCurrentView in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getCurrentView in interface ClusterPartitionMBean
Returns:
A Vector Strings representing the host:port values of the nodes

getClusterNodes

public org.jboss.ha.framework.interfaces.ClusterNode[] getClusterNodes()
Specified by:
getClusterNodes in interface org.jboss.ha.framework.interfaces.HAPartition

getClusterNode

public org.jboss.ha.framework.interfaces.ClusterNode getClusterNode()
Specified by:
getClusterNode in interface org.jboss.ha.framework.interfaces.HAPartition

isCurrentNodeCoordinator

public boolean isCurrentNodeCoordinator()

registerRPCHandler

public void registerRPCHandler(String objName,
                               Object subscriber)
Specified by:
registerRPCHandler in interface org.jboss.ha.framework.interfaces.HAPartition

registerRPCHandler

public void registerRPCHandler(String objName,
                               Object subscriber,
                               ClassLoader classloader)
Specified by:
registerRPCHandler in interface org.jboss.ha.framework.interfaces.HAPartition

unregisterRPCHandler

public void unregisterRPCHandler(String objName,
                                 Object subscriber)
Specified by:
unregisterRPCHandler in interface org.jboss.ha.framework.interfaces.HAPartition

callMethodOnCluster

public ArrayList callMethodOnCluster(String objName,
                                     String methodName,
                                     Object[] args,
                                     Class[] types,
                                     boolean excludeSelf)
                              throws Exception
This function is an abstraction of RpcDispatcher.

Specified by:
callMethodOnCluster in interface org.jboss.ha.framework.interfaces.HAPartition
Throws:
Exception

callMethodOnCluster

public ArrayList callMethodOnCluster(String objName,
                                     String methodName,
                                     Object[] args,
                                     Class[] types,
                                     boolean excludeSelf,
                                     org.jboss.ha.framework.interfaces.ResponseFilter filter)
                              throws Exception
Specified by:
callMethodOnCluster in interface org.jboss.ha.framework.interfaces.HAPartition
Throws:
Exception

callMethodOnCluster

public ArrayList callMethodOnCluster(String objName,
                                     String methodName,
                                     Object[] args,
                                     Class[] types,
                                     boolean excludeSelf,
                                     long methodTimeout,
                                     org.jboss.ha.framework.interfaces.ResponseFilter filter)
                              throws Exception
Throws:
Exception

callMethodOnCoordinatorNode

public ArrayList callMethodOnCoordinatorNode(String objName,
                                             String methodName,
                                             Object[] args,
                                             Class[] types,
                                             boolean excludeSelf)
                                      throws Exception
Calls method on Cluster coordinator node only. The cluster coordinator node is the first node to join the cluster. and is replaced

Specified by:
callMethodOnCoordinatorNode in interface org.jboss.ha.framework.interfaces.HAPartition
Parameters:
objName -
methodName -
args -
types -
excludeSelf -
Returns:
an array of responses from remote nodes
Throws:
Exception

callMethodOnCoordinatorNode

public ArrayList callMethodOnCoordinatorNode(String objName,
                                             String methodName,
                                             Object[] args,
                                             Class[] types,
                                             boolean excludeSelf,
                                             long methodTimeout)
                                      throws Exception
Calls method on Cluster coordinator node only. The cluster coordinator node is the first node to join the cluster. and is replaced

Parameters:
objName -
methodName -
args -
types -
excludeSelf -
methodTimeout -
Returns:
an array of responses from remote nodes
Throws:
Exception

callMethodOnNode

public Object callMethodOnNode(String serviceName,
                               String methodName,
                               Object[] args,
                               Class[] types,
                               long methodTimeout,
                               org.jboss.ha.framework.interfaces.ClusterNode targetNode)
                        throws Throwable
Calls method synchrounously on target node only.

Specified by:
callMethodOnNode in interface org.jboss.ha.framework.interfaces.HAPartition
Parameters:
serviceName - Name of the target service name on which calls are de-multiplexed
methodName - name of the Java method to be called on remote services
args - array of Java Object representing the set of parameters to be given to the remote method
types - The types of the parameters node of the partition or only on remote nodes
targetNode - is the target of the call
Returns:
the value returned by the target method
Throws:
Exception - Throws if a communication exception occurs
Throwable

callAsyncMethodOnNode

public void callAsyncMethodOnNode(String serviceName,
                                  String methodName,
                                  Object[] args,
                                  Class[] types,
                                  long methodTimeout,
                                  org.jboss.ha.framework.interfaces.ClusterNode targetNode)
                           throws Throwable
Calls method on target node only.

Specified by:
callAsyncMethodOnNode in interface org.jboss.ha.framework.interfaces.HAPartition
Parameters:
serviceName - Name of the target service name on which calls are de-multiplexed
methodName - name of the Java method to be called on remote services
args - array of Java Object representing the set of parameters to be given to the remote method
types - The types of the parameters node of the partition or only on remote nodes
targetNode - is the target of the call
Throws:
Exception - Throws if a communication exception occurs
Throwable

callAsynchMethodOnCluster

public void callAsynchMethodOnCluster(String objName,
                                      String methodName,
                                      Object[] args,
                                      Class[] types,
                                      boolean excludeSelf)
                               throws Exception
This function is an abstraction of RpcDispatcher for asynchronous messages

Specified by:
callAsynchMethodOnCluster in interface org.jboss.ha.framework.interfaces.HAPartition
Throws:
Exception

subscribeToStateTransferEvents

public void subscribeToStateTransferEvents(String objectName,
                                           org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer subscriber)
Specified by:
subscribeToStateTransferEvents in interface org.jboss.ha.framework.interfaces.HAPartition

unsubscribeFromStateTransferEvents

public void unsubscribeFromStateTransferEvents(String objectName,
                                               org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer subscriber)
Specified by:
unsubscribeFromStateTransferEvents in interface org.jboss.ha.framework.interfaces.HAPartition

registerMembershipListener

public void registerMembershipListener(org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener listener)
Specified by:
registerMembershipListener in interface org.jboss.ha.framework.interfaces.HAPartition

unregisterMembershipListener

public void unregisterMembershipListener(org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener listener)
Specified by:
unregisterMembershipListener in interface org.jboss.ha.framework.interfaces.HAPartition

getAllowSynchronousMembershipNotifications

public boolean getAllowSynchronousMembershipNotifications()
Description copied from interface: ClusterPartitionMBean
Returns whether this partition will synchronously notify any HAPartition.HAMembershipListener of membership changes using the calling thread from the underlying group communications layer (e.g. JGroups).

Specified by:
getAllowSynchronousMembershipNotifications in interface org.jboss.ha.framework.interfaces.HAPartition
Specified by:
getAllowSynchronousMembershipNotifications in interface ClusterPartitionMBean
Returns:
true if registered listeners that don't implement AsynchHAMembershipExtendedListener or AsynchHAMembershipListener will be notified synchronously of membership changes; false if those listeners will be notified asynchronously. Default is false.

setAllowSynchronousMembershipNotifications

public void setAllowSynchronousMembershipNotifications(boolean allowSync)
Sets whether this partition will synchronously notify any HAPartition.HAMembershipListener of membership changes using the calling thread from the underlying group communications layer (e.g. JGroups).

Specified by:
setAllowSynchronousMembershipNotifications in interface org.jboss.ha.framework.interfaces.HAPartition
Parameters:
allowSync - true if registered listeners that don't implement AsynchHAMembershipExtendedListener or AsynchHAMembershipListener should be notified synchronously of membership changes; false if those listeners can be notified asynchronously. Default is false.

processEvent

public void processEvent(Object event)
Specified by:
processEvent in interface AsynchEventHandler.AsynchEventProcessor

setDistributedStateImpl

public void setDistributedStateImpl(org.jboss.ha.framework.interfaces.DistributedState distributedState)

verifyNodeIsUnique

protected void verifyNodeIsUnique()
                           throws IllegalStateException
Throws:
IllegalStateException

bind

protected void bind(String jndiName,
                    Object who,
                    Class<?> classType,
                    Context ctx)
             throws Exception
Helper method that binds the partition in the JNDI tree.

Parameters:
jndiName - Name under which the object must be bound
who - Object to bind in JNDI
classType - Class type under which should appear the bound object
ctx - Naming context under which we bind the object
Throws:
Exception - Thrown if a naming exception occurs during binding

getDeadMembers

protected Vector<org.jboss.ha.framework.interfaces.ClusterNode> getDeadMembers(Vector<org.jboss.ha.framework.interfaces.ClusterNode> oldMembers,
                                                                               Vector<org.jboss.ha.framework.interfaces.ClusterNode> newMembers)
Helper method that returns a vector of dead members from two input vectors: new and old vectors of two views. Dead members are old - new members.

Parameters:
oldMembers - Vector of old members
newMembers - Vector of new members
Returns:
Vector of members that have died between the two views, can be empty.

getNewMembers

protected Vector<org.jboss.ha.framework.interfaces.ClusterNode> getNewMembers(Vector<org.jboss.ha.framework.interfaces.ClusterNode> oldMembers,
                                                                              Vector<org.jboss.ha.framework.interfaces.ClusterNode> allMembers)
Helper method that returns a vector of new members from two input vectors: new and old vectors of two views.

Parameters:
oldMembers - Vector of old members
allMembers - Vector of new members
Returns:
Vector of members that have joined the partition between the two views

notifyListeners

protected void notifyListeners(ArrayList<org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener> theListeners,
                               long viewID,
                               Vector<org.jboss.ha.framework.interfaces.ClusterNode> allMembers,
                               Vector<org.jboss.ha.framework.interfaces.ClusterNode> deadMembers,
                               Vector<org.jboss.ha.framework.interfaces.ClusterNode> newMembers,
                               Vector<org.jgroups.View> originatingGroups)

setBindIntoJndi

public void setBindIntoJndi(boolean bind)

getBindIntoJndi

public boolean getBindIntoJndi()

getThreadPool

public org.jboss.util.threadpool.ThreadPool getThreadPool()

setThreadPool

public void setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)

getHaPartitionDependencyCreator

public HAPartitionDependencyCreator getHaPartitionDependencyCreator()

setHaPartitionDependencyCreator

public void setHaPartitionDependencyCreator(HAPartitionDependencyCreator haPartitionDependencyCreator)

translateAddresses

protected Vector<org.jboss.ha.framework.interfaces.ClusterNode> translateAddresses(Vector<org.jgroups.Address> addresses)

logHistory

public void logHistory(String message)

showHistory

public String showHistory()
Description copied from interface: ClusterPartitionMBean
Gets a listing of significant events since the instantiation of this service (e.g. view changes, member suspicions).

Specified by:
showHistory in interface ClusterPartitionMBean
Returns:
a String with one event per line

showHistoryAsXML

public String showHistoryAsXML()
Description copied from interface: ClusterPartitionMBean
Gets a listing of significant events since the instantiation of this service (e.g. view changes, member suspicions) in an XML format.

Specified by:
showHistoryAsXML in interface ClusterPartitionMBean
Returns:
an XML string with each historical event wrapped in an "event" element, with all surrounded by an "events" element.

getDeadlockDetection

@Deprecated
public boolean getDeadlockDetection()
Deprecated. will be removed in next major release

Deprecated; always returns false.

Specified by:
getDeadlockDetection in interface ClusterPartitionMBean
Returns:
false

setDeadlockDetection

@Deprecated
public void setDeadlockDetection(boolean doit)
Deprecated. will be removed in next major release

Deprecated; logs a WARN message if invoked.

Parameters:
doIt - ignored

getHAPartition

@Deprecated
public org.jboss.ha.framework.interfaces.HAPartition getHAPartition()
Deprecated. 

Description copied from interface: ClusterPartitionMBean
Access to the underlying HAPartition without going through JNDI

Specified by:
getHAPartition in interface ClusterPartitionMBean
Returns:
the HAPartition for the cluster service

getJGroupsVersion

public String getJGroupsVersion()
Description copied from interface: ClusterPartitionMBean
The version of JGroups this is running on

Specified by:
getJGroupsVersion in interface ClusterPartitionMBean

getDistributedReplicantManagerImpl

public DistributedReplicantManagerImpl getDistributedReplicantManagerImpl()

getChannelFactory

public org.jgroups.ChannelFactory getChannelFactory()

getCacheHandler

public org.jboss.ha.framework.server.spi.HAPartitionCacheHandler getCacheHandler()

setCacheHandler

public void setCacheHandler(org.jboss.ha.framework.server.spi.HAPartitionCacheHandler cacheHandler)

getCacheConfigName

public String getCacheConfigName()
Description copied from interface: ClusterPartitionMBean
Gets the configuration name under which our cache is registered with the cache manager.

Specified by:
getCacheConfigName in interface ClusterPartitionMBean

getChannelStackName

public String getChannelStackName()
Description copied from interface: ClusterPartitionMBean
Gets the name of the JGroups channel protocol stack configuration provided to the channel factory.

Specified by:
getChannelStackName in interface ClusterPartitionMBean

getNodeAddress

public InetAddress getNodeAddress()
Description copied from interface: ClusterPartitionMBean
The node address used to generate the node name

Specified by:
getNodeAddress in interface ClusterPartitionMBean

setNodeAddress

public void setNodeAddress(InetAddress address)

getStateTransferTimeout

public long getStateTransferTimeout()
Description copied from interface: ClusterPartitionMBean
Number of milliseconds to wait until state has been transferred, or zero to wait forever. Increase this value for large states

Specified by:
getStateTransferTimeout in interface ClusterPartitionMBean

setStateTransferTimeout

public void setStateTransferTimeout(long timeout)

getMethodCallTimeout

public long getMethodCallTimeout()
Description copied from interface: ClusterPartitionMBean
Gets the max time (in ms) to wait for synchronous group method calls (HAPartition.callMethodOnCluster(String, String, Object[], Class[], boolean))

Specified by:
getMethodCallTimeout in interface ClusterPartitionMBean

setMethodCallTimeout

public void setMethodCallTimeout(long timeout)

setKernelControllerContext

public void setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext controllerContext)
                                throws Exception
Specified by:
setKernelControllerContext in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Overrides:
setKernelControllerContext in class ServiceMBeanSupport
Throws:
Exception

unsetKernelControllerContext

public void unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext controllerContext)
                                  throws Exception
Specified by:
unsetKernelControllerContext in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Overrides:
unsetKernelControllerContext in class ServiceMBeanSupport
Throws:
Exception

objectFromByteBufferInternal

protected Object objectFromByteBufferInternal(byte[] buffer)
                                       throws Exception
Creates an object from a byte buffer

Throws:
Exception

objectToByteBufferInternal

protected byte[] objectToByteBufferInternal(Object obj)
                                     throws Exception
Serializes an object into a byte buffer. The object has to implement interface Serializable or Externalizable

Throws:
Exception

objectFromByteBufferResponseInternal

protected Object objectFromByteBufferResponseInternal(byte[] buffer)
                                               throws Exception
Creates a response object from a byte buffer - optimized for response marshalling

Throws:
Exception

objectToByteBufferResponseInternal

protected byte[] objectToByteBufferResponseInternal(Object obj)
                                             throws Exception
Serializes a response object into a byte buffer, optimized for response marshalling. The object has to implement interface Serializable or Externalizable

Throws:
Exception


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.