Class WmClusterPolicy
- java.lang.Object
-
- com.webmethods.jms.loadbalance.policy.WmClusterPolicy
-
- Direct Known Subclasses:
WmClusterMultiSendXA
,WmClusterRandomPolicy
,WmClusterRoundRobinPolicy
,WmClusterStickyPolicy
,WmClusterWeightedRoundRobinPolicy
public abstract class WmClusterPolicy extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Random
random
-
Constructor Summary
Constructors Modifier Constructor Description protected
WmClusterPolicy(java.lang.String name)
This constructor is called within the package.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description WmClusterBrokerInfo[]
getAllBrokers(WmClusterConnectionImpl clusterConn)
Retrieve all the Broker data in the cluster.java.util.concurrent.CopyOnWriteArrayList<java.lang.String>
getAllBrokerURLs(WmClusterConnectionImpl clusterConn)
Retrieve all the Broker URL strings in the cluster.java.lang.String
getName()
Gets the policy identifier.abstract int
getNextPublishBroker(WmClusterConnectionImpl clusterConn)
Find the next Broker to publish to in the list according to the policy rules.abstract int
getNextPublishCluster(WmCompositeClusterConnectionImpl clusterConn)
-
-
-
Constructor Detail
-
WmClusterPolicy
protected WmClusterPolicy(java.lang.String name)
This constructor is called within the package.All concrete classes that extends WmClusterPolicy should provide a constructor that does not take any parameters. See
WmClusterStickyPolicy
.
- Parameters:
name
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the policy identifier.
-
getNextPublishBroker
public abstract int getNextPublishBroker(WmClusterConnectionImpl clusterConn)
Find the next Broker to publish to in the list according to the policy rules. Order may not be relevant to some policies.
-
getNextPublishCluster
public abstract int getNextPublishCluster(WmCompositeClusterConnectionImpl clusterConn)
-
getAllBrokers
public WmClusterBrokerInfo[] getAllBrokers(WmClusterConnectionImpl clusterConn)
Retrieve all the Broker data in the cluster.
-
getAllBrokerURLs
public java.util.concurrent.CopyOnWriteArrayList<java.lang.String> getAllBrokerURLs(WmClusterConnectionImpl clusterConn)
Retrieve all the Broker URL strings in the cluster.
-
-