com.gigaspaces.cluster.loadbalance
Class LoadBalancingPolicy

java.lang.Object
  extended by com.gigaspaces.cluster.loadbalance.LoadBalancingPolicy
All Implemented Interfaces:
Serializable

public class LoadBalancingPolicy
extends Object
implements Serializable

Title: The GigaSpaces Platform Description: Load Balancing Policy class Copyright: Copyright (c) J-Spaces Team Company: J-Spaces Technologies

See Also:
Serialized Form

Nested Class Summary
static class LoadBalancingPolicy.BroadcastCondition
           
static class LoadBalancingPolicy.LoadBalancingPolicyDescription
           
 
Field Summary
static int DEFAULT_BROADCAST_THREADPOOL_MAX_SIZE
           
static int DEFAULT_BROADCAST_THREADPOOL_MIN_SIZE
           
 List<String> loadBalanceGroupMembersNames
           
 List<SpaceURL> loadBalanceGroupMembersURLs
           
 boolean m_ApplyOwnership
           
 int m_broadcastThreadpoolMaxSize
           
 int m_broadcastThreadpoolMinSize
           
 LoadBalancingPolicy.LoadBalancingPolicyDescription m_DefaultPolicy
           
 boolean m_DisableMultiSpacesBroadcast
           
 boolean m_DisableParallelScattering
           
 String m_GroupName
           
 String m_ImplementationClassName
           
 LoadBalancingPolicy.LoadBalancingPolicyDescription m_NotifyOperationsPolicy
           
 LoadBalancingPolicy.LoadBalancingPolicyDescription m_ReadOperationsPolicy
           
 LoadBalancingPolicy.LoadBalancingPolicyDescription m_TakeOperationsPolicy
           
 LoadBalancingPolicy.LoadBalancingPolicyDescription m_WriteOperationsPolicy
           
static int OPERATION_CANCEL
           
static int OPERATION_CLEAR
           
static int OPERATION_COUNT
           
static int OPERATION_NONE
           
static int OPERATION_NOTIFY
           
static int OPERATION_READ
           
static int OPERATION_READ_MULTIPLE
           
static int OPERATION_READIE
           
static int OPERATION_RENEW
           
static int OPERATION_TAKE
           
static int OPERATION_TAKE_MULTIPLE
           
static int OPERATION_TAKEIE
           
static int OPERATION_UPDATE
           
static int OPERATION_UPDATE_MULTIPLE
           
static int OPERATION_WRITE
           
static int OPERATION_WRITE_MULTIPLE
           
 
Constructor Summary
LoadBalancingPolicy()
           
 
Method Summary
static String getOperationName(int operationId)
          Converts load-balancing operation from int to String
 String getPolicyTypeFromOperationId(int operationId)
          returns current load-balancing policy from desired operation id
 List<SpaceURL> getRecoverableTargets(String clusterName, String myMemberName, List<String> excludeTargets)
          Finds all the recovery targets in cluster.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_GroupName

public String m_GroupName

loadBalanceGroupMembersNames

public List<String> loadBalanceGroupMembersNames

loadBalanceGroupMembersURLs

public List<SpaceURL> loadBalanceGroupMembersURLs

m_ImplementationClassName

public String m_ImplementationClassName

m_ApplyOwnership

public boolean m_ApplyOwnership

m_DisableParallelScattering

public boolean m_DisableParallelScattering

m_DisableMultiSpacesBroadcast

public boolean m_DisableMultiSpacesBroadcast

DEFAULT_BROADCAST_THREADPOOL_MIN_SIZE

public static final int DEFAULT_BROADCAST_THREADPOOL_MIN_SIZE
See Also:
Constant Field Values

DEFAULT_BROADCAST_THREADPOOL_MAX_SIZE

public static final int DEFAULT_BROADCAST_THREADPOOL_MAX_SIZE
See Also:
Constant Field Values

m_broadcastThreadpoolMinSize

public int m_broadcastThreadpoolMinSize

m_broadcastThreadpoolMaxSize

public int m_broadcastThreadpoolMaxSize

m_WriteOperationsPolicy

public LoadBalancingPolicy.LoadBalancingPolicyDescription m_WriteOperationsPolicy

m_ReadOperationsPolicy

public LoadBalancingPolicy.LoadBalancingPolicyDescription m_ReadOperationsPolicy

m_TakeOperationsPolicy

public LoadBalancingPolicy.LoadBalancingPolicyDescription m_TakeOperationsPolicy

m_NotifyOperationsPolicy

public LoadBalancingPolicy.LoadBalancingPolicyDescription m_NotifyOperationsPolicy

m_DefaultPolicy

public LoadBalancingPolicy.LoadBalancingPolicyDescription m_DefaultPolicy

OPERATION_NONE

public static final int OPERATION_NONE
See Also:
Constant Field Values

OPERATION_WRITE

public static final int OPERATION_WRITE
See Also:
Constant Field Values

OPERATION_READ

public static final int OPERATION_READ
See Also:
Constant Field Values

OPERATION_READIE

public static final int OPERATION_READIE
See Also:
Constant Field Values

OPERATION_TAKE

public static final int OPERATION_TAKE
See Also:
Constant Field Values

OPERATION_TAKEIE

public static final int OPERATION_TAKEIE
See Also:
Constant Field Values

OPERATION_NOTIFY

public static final int OPERATION_NOTIFY
See Also:
Constant Field Values

OPERATION_COUNT

public static final int OPERATION_COUNT
See Also:
Constant Field Values

OPERATION_CLEAR

public static final int OPERATION_CLEAR
See Also:
Constant Field Values

OPERATION_WRITE_MULTIPLE

public static final int OPERATION_WRITE_MULTIPLE
See Also:
Constant Field Values

OPERATION_READ_MULTIPLE

public static final int OPERATION_READ_MULTIPLE
See Also:
Constant Field Values

OPERATION_TAKE_MULTIPLE

public static final int OPERATION_TAKE_MULTIPLE
See Also:
Constant Field Values

OPERATION_UPDATE

public static final int OPERATION_UPDATE
See Also:
Constant Field Values

OPERATION_UPDATE_MULTIPLE

public static final int OPERATION_UPDATE_MULTIPLE
See Also:
Constant Field Values

OPERATION_RENEW

public static final int OPERATION_RENEW
See Also:
Constant Field Values

OPERATION_CANCEL

public static final int OPERATION_CANCEL
See Also:
Constant Field Values
Constructor Detail

LoadBalancingPolicy

public LoadBalancingPolicy()
Method Detail

getPolicyTypeFromOperationId

public String getPolicyTypeFromOperationId(int operationId)
returns current load-balancing policy from desired operation id


getOperationName

public static String getOperationName(int operationId)
Converts load-balancing operation from int to String


getRecoverableTargets

public List<SpaceURL> getRecoverableTargets(String clusterName,
                                            String myMemberName,
                                            List<String> excludeTargets)
Finds all the recovery targets in cluster. If jini URLs are used, the first target will always be multicast url. only if it fails the unicast and rmi URLs will be used.

Parameters:
clusterName - the cluster to recover in.
myMemberName - the member of the cluster that needs to be recovered.
excludeTargets - targets that should be excluded from recovery
Returns:
a list of recoverable members SpaceURLs. returns empty list if recovery is disabled.

toString

public String toString()
Overrides:
toString in class Object