SonicMQ API

progress.message.broker.loadbalancing
Interface IBrokerContext


public interface IBrokerContext

This interface provides information to an ILoadBalancer implementation about broker's and their acceptors for use in load balancing.

Since:
7.7
See Also:
ILoadBalancer

Method Summary
 IBrokerContext[] getBrokerContexts()
          Returns an array of IBrokerContexts that belong to the same cluster as the broker represented by this IBrokerContext.
 IBrokerContext[] getBrokerContexts(boolean excludeWeightless)
          Returns an array of IBrokerContexts that belong to the same cluster as the broker represented by this IBrokerContext optionally excluding those that are not assigned any load balancing weight.
 java.lang.String getBrokerName()
          Gets the name of the broker represented by this IBrokerContext.
 java.lang.String getClusterName()
          Returns the name of the cluster this broker belongs to if it is part of a cluster.
 int getLoadBalancingWeight()
          Gets the weight assigned to the broker for load balancing purposes.
 java.lang.String getRedirectURLs(java.lang.String acceptorName)
          Gets a list of urls that match the given acceptor name for the broker represented by this context.
 

Method Detail

getBrokerName

java.lang.String getBrokerName()
Gets the name of the broker represented by this IBrokerContext.

Returns:
The broker name.

getRedirectURLs

java.lang.String getRedirectURLs(java.lang.String acceptorName)
Gets a list of urls that match the given acceptor name for the broker represented by this context.

Returns:
The broker name.

getClusterName

java.lang.String getClusterName()
Returns the name of the cluster this broker belongs to if it is part of a cluster. Otherwise this will return null, if the broker is not a cluster member.

Returns:
The name of the cluster this broker belongs to

getLoadBalancingWeight

int getLoadBalancingWeight()
Gets the weight assigned to the broker for load balancing purposes.

Returns:
The load balancing weight assigned to the broker

getBrokerContexts

IBrokerContext[] getBrokerContexts()
Returns an array of IBrokerContexts that belong to the same cluster as the broker represented by this IBrokerContext.

Returns:
Information on other brokers in the same cluster as this broker.

getBrokerContexts

IBrokerContext[] getBrokerContexts(boolean excludeWeightless)
Returns an array of IBrokerContexts that belong to the same cluster as the broker represented by this IBrokerContext optionally excluding those that are not assigned any load balancing weight. Note that since acceptor information and cluster memberships can change during the lifecycle of the load balancer, implementations are encouraged to get this information often if not on each loadbalancing call.

Returns:
Information on other brokers in the same cluster as this broker.

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.