com.caucho.cloud.topology
Enum TriadOwner
java.lang.Object
java.lang.Enum<TriadOwner>
com.caucho.cloud.topology.TriadOwner
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<TriadOwner>
public enum TriadOwner
- extends java.lang.Enum<TriadOwner>
The triad owner is the triad ownership for a hashed item. Each owner has
a primary, secondary and tertiary owner.
The first three servers are the triad servers.
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
A_B
public static final TriadOwner A_B
B_C
public static final TriadOwner B_C
C_A
public static final TriadOwner C_A
A_C
public static final TriadOwner A_C
B_A
public static final TriadOwner B_A
C_B
public static final TriadOwner C_B
OWNER_VALUES
public static final TriadOwner[] OWNER_VALUES
values
public static TriadOwner[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (TriadOwner c : TriadOwner.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TriadOwner valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
getPrimary
public abstract int getPrimary()
getSecondary
public abstract int getSecondary()
getTertiary
public abstract int getTertiary()
getOwner
public static TriadOwner getOwner(long index)
- Returns the owner for an index
getHashOwner
public static TriadOwner getHashOwner(byte[] hash)
getHashOwner
public static TriadOwner getHashOwner(java.lang.String value)