Package de.caluga.morphium.annotations
Enum ReadPreferenceLevel
- java.lang.Object
-
- java.lang.Enum<ReadPreferenceLevel>
-
- de.caluga.morphium.annotations.ReadPreferenceLevel
-
- All Implemented Interfaces:
Serializable,Comparable<ReadPreferenceLevel>
public enum ReadPreferenceLevel extends Enum<ReadPreferenceLevel>
User: Stephan Bösebeck Date: 30.08.12 Time: 13:54 Define the read preference level for this type. Read from PRimary only or allow to read from secondaries.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NEARESTPRIMARYPRIMARY_PREFERREDSECONDARYSECONDARY_PREFERRED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadPreferencegetPref()voidsetPref(ReadPreference pref)static ReadPreferenceLevelvalueOf(String name)Returns the enum constant of this type with the specified name.static ReadPreferenceLevel[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRIMARY
public static final ReadPreferenceLevel PRIMARY
-
PRIMARY_PREFERRED
public static final ReadPreferenceLevel PRIMARY_PREFERRED
-
SECONDARY
public static final ReadPreferenceLevel SECONDARY
-
SECONDARY_PREFERRED
public static final ReadPreferenceLevel SECONDARY_PREFERRED
-
NEAREST
public static final ReadPreferenceLevel NEAREST
-
-
Method Detail
-
values
public static ReadPreferenceLevel[] 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 (ReadPreferenceLevel c : ReadPreferenceLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReadPreferenceLevel valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getPref
public ReadPreference getPref()
-
setPref
public void setPref(ReadPreference pref)
-
-