Novell exteNd Messaging Platform 5.2

com.sssw.jbroker.api.cluster
Class ClusterPolicyValue

java.lang.Object
  extended bycom.sssw.jbroker.api.transport.TransportPolicyValue
      extended bycom.sssw.jbroker.api.cluster.ClusterPolicyValue
All Implemented Interfaces:
Serializable

public class ClusterPolicyValue
extends TransportPolicyValue

The ClusterPolicyValue specifies the primary and secondary addresses for the cluster objects as well as the clustering scheme.

The current POA/server only listens for primary address(es). For clustering to work, the same POA should be created on another server, with the alternate address specified here as its primary address, and vice versa.

Since:
jBroker ORB 4.0
See Also:
Serialized Form

Field Summary
static int CUSTOM_SCHEME
          Custom clustering scheme.
static int FO_RO_SCHEME
          Fail Over clustering scheme for read-only objects.
static int FO_SCHEME
          Fail Over clustering scheme.
static int RR_RO_SCHEME
          Round Robin Load Balancing scheme for read-only objects.
static int RR_SCHEME
          Round Robin Load Balancing scheme.
 
Constructor Summary
ClusterPolicyValue(TCPAddress[] primaryAddrs, TCPAddress[] alternateAddrs, int scheme)
          Create a cluster policy value.
ClusterPolicyValue(TCPAddress primaryAddr, TCPAddress[] alternateAddrs, int scheme)
          Create a cluster policy value.
 
Method Summary
 boolean equals(Object other)
           
 TCPAddress[] getAllAddresses()
          Get all the adddresses.
 TCPAddress[] getAlternateAddresses()
          Get the alternate adddresses.
 int getScheme()
          Get the clustering scheme.
 
Methods inherited from class com.sssw.jbroker.api.transport.TransportPolicyValue
getPrimaryAddresses
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RR_SCHEME

public static final int RR_SCHEME
Round Robin Load Balancing scheme. The client round-robin requests to the various addresses specified.

See Also:
Constant Field Values

RR_RO_SCHEME

public static final int RR_RO_SCHEME
Round Robin Load Balancing scheme for read-only objects. The client round-robin requests to the various addresses specified. This scheme ignores COMM_FAILUREs with Completion status MAYBE.

See Also:
Constant Field Values

FO_SCHEME

public static final int FO_SCHEME
Fail Over clustering scheme. The client will choose one of the addresses to communicate with until there is a failure, in which case, it fails over to the next address.

See Also:
Constant Field Values

FO_RO_SCHEME

public static final int FO_RO_SCHEME
Fail Over clustering scheme for read-only objects. The client will choose one of the addresses to communicate with until there is a failure, in which case, it fails over to the next address. This scheme ignores COMM_FAILUREs with Completion status MAYBE.

See Also:
Constant Field Values

CUSTOM_SCHEME

public static final int CUSTOM_SCHEME
Custom clustering scheme. The client will invoke a callback method in order to decide which of the addresses to communicate with. In case of failure, the callback is called repeatedly, i.e. it is the responsibility of the callback method to raise the appropriate system exception in case of failure

See Also:
CustomPolicyController, ORB.setCustomPolicyController(com.sssw.jbroker.api.cluster.CustomPolicyController), Constant Field Values
Constructor Detail

ClusterPolicyValue

public ClusterPolicyValue(TCPAddress primaryAddr,
                          TCPAddress[] alternateAddrs,
                          int scheme)
Create a cluster policy value. The current server only listens on the primary addresses; another server is expected to listen of the alternate addresses.

Parameters:
primaryAddr - the primary address for the POA on the server
alternateAddrs - the alternate addresses for the POA on other servers
scheme - clustering scheme

ClusterPolicyValue

public ClusterPolicyValue(TCPAddress[] primaryAddrs,
                          TCPAddress[] alternateAddrs,
                          int scheme)
Create a cluster policy value.

Parameters:
primaryAddrs - the primary addresses for the POA on the server
alternateAddrs - the alternate addresses for the POA on other servers
scheme - clustering scheme
Method Detail

getScheme

public int getScheme()
Get the clustering scheme.


getAlternateAddresses

public TCPAddress[] getAlternateAddresses()
Get the alternate adddresses.


getAllAddresses

public TCPAddress[] getAllAddresses()
Get all the adddresses.

Overrides:
getAllAddresses in class TransportPolicyValue

equals

public boolean equals(Object other)
Overrides:
equals in class TransportPolicyValue

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.