Package com.webmethods.jms.util
Class WeightedRoundRobin
- java.lang.Object
-
- com.webmethods.jms.util.WeightedRoundRobin
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
public class WeightedRoundRobin extends java.lang.Object implements java.io.Externalizable
This class encapsulates the configuration data for a weighted round robin policy. This load balancing policy distributes messages based on the weights assigned to each of the brokers in the cluster. The weight signifies the processing capabilities of a broker in the cluster and should be set appropriately by the user for the broker to handle more or fewer messages.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WeightedRoundRobin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBrokerName()
Get the name of cluster broker for which the weight is configured.java.lang.Integer
getWeight()
Get the weight associated with a cluster broker governed by a Weighted Round Robin policyvoid
readExternal(java.io.ObjectInput in)
void
setBrokerName(java.lang.String brokerName)
Set the name of cluster broker for which the weight is configured.void
setWeight(java.lang.Integer weight)
Set the weight for a cluster broker which is governed by a Weighted Round Robin policyjava.lang.String
toString()
Returns the string representation of the Broker and the corresponding weight.void
writeExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
getBrokerName
public java.lang.String getBrokerName()
Get the name of cluster broker for which the weight is configured.- Returns:
- broker name
-
setBrokerName
public void setBrokerName(java.lang.String brokerName)
Set the name of cluster broker for which the weight is configured.- Parameters:
brokerName
-
-
getWeight
public java.lang.Integer getWeight()
Get the weight associated with a cluster broker governed by a Weighted Round Robin policy- Returns:
- weight
-
setWeight
public void setWeight(java.lang.Integer weight)
Set the weight for a cluster broker which is governed by a Weighted Round Robin policy- Parameters:
weight
-
-
toString
public java.lang.String toString()
Returns the string representation of the Broker and the corresponding weight.- Overrides:
toString
in classjava.lang.Object
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
-