com.caucho.server.cluster
Class OwnerServerTriad

java.lang.Object
  extended by com.caucho.server.cluster.OwnerServerTriad

public final class OwnerServerTriad
extends java.lang.Object

The primary,secondary,tertiary for a ClusterTriad.Owner


Constructor Summary
OwnerServerTriad(ClusterServer primary, ClusterServer secondary, ClusterServer tertiary)
          Creates the server triad for a ClusterTriad.Owner
 
Method Summary
 ClusterServer getActiveOrSelfServer(ClusterServer oldServer)
          Returns the best primary or secondary triad server.
 ClusterServer getActiveServer(ClusterServer oldServer)
          Returns the best primary or secondary triad server.
 ClusterServer getPrimary()
          Returns the primary for this ownership triad.
 ClusterServer getPrimaryIfActiveRemote()
          Returns the primary if it is active, i.e.
 ClusterServer getPrimaryIfRemote()
          Returns the primary if it is remote, i.e.
 ClusterServer getSecondary()
          Returns the secondary for this ownership triad.
 ClusterServer getSecondaryIfActiveRemote()
          Returns the secondary if it is remote, i.e.
 ClusterServer getSecondaryIfRemote()
          Returns the secondary if it is remote, i.e.
 ClusterServer getTertiary()
          Returns the tertiary for this ownership triad.
 ClusterServer getTertiaryIfActiveRemote()
          Returns the tertiary if it is remote, i.e.
 ClusterServer getTertiaryIfRemote()
          Returns the tertiary if it is remote, i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwnerServerTriad

public OwnerServerTriad(ClusterServer primary,
                        ClusterServer secondary,
                        ClusterServer tertiary)
Creates the server triad for a ClusterTriad.Owner

Method Detail

getPrimary

public final ClusterServer getPrimary()
Returns the primary for this ownership triad.


getSecondary

public final ClusterServer getSecondary()
Returns the secondary for this ownership triad.


getTertiary

public final ClusterServer getTertiary()
Returns the tertiary for this ownership triad.


getPrimaryIfRemote

public final ClusterServer getPrimaryIfRemote()
Returns the primary if it is remote, i.e. not this server itself.


getSecondaryIfRemote

public final ClusterServer getSecondaryIfRemote()
Returns the secondary if it is remote, i.e. not this server itself.


getTertiaryIfRemote

public final ClusterServer getTertiaryIfRemote()
Returns the tertiary if it is remote, i.e. not this server itself.


getPrimaryIfActiveRemote

public final ClusterServer getPrimaryIfActiveRemote()
Returns the primary if it is active, i.e. not this server itself and not stopped


getSecondaryIfActiveRemote

public final ClusterServer getSecondaryIfActiveRemote()
Returns the secondary if it is remote, i.e. not this server itself.


getTertiaryIfActiveRemote

public final ClusterServer getTertiaryIfActiveRemote()
Returns the tertiary if it is remote, i.e. not this server itself.


getActiveServer

public ClusterServer getActiveServer(ClusterServer oldServer)
Returns the best primary or secondary triad server.


getActiveOrSelfServer

public ClusterServer getActiveOrSelfServer(ClusterServer oldServer)
Returns the best primary or secondary triad server.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object