public enum BalancerClass extends java.lang.Enum<BalancerClass> implements ClassEnum<Balancer<?>>
Enum Constant and Description |
---|
LOAD |
RANDOM |
ROUND_ROBIN |
SIMPLE |
Modifier and Type | Method and Description |
---|---|
static Balancer<?> |
deserialize(java.lang.String id)
Creates a new instance of the Balancer implementation identified by the specified identifier
|
boolean |
isInstance(Balancer<?> balancer)
Indicates whether the specified object is an instance of this enumerated class.
|
Balancer<?> |
newInstance()
Creates a new instance of the enumerated class.
|
static java.lang.String |
serialize(Balancer<?> balancer)
Return the identifier of the specified Balancer.
|
static BalancerClass |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BalancerClass[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BalancerClass SIMPLE
public static final BalancerClass RANDOM
public static final BalancerClass ROUND_ROBIN
public static final BalancerClass LOAD
public static BalancerClass[] values()
for (BalancerClass c : BalancerClass.values()) System.out.println(c);
public static BalancerClass valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isInstance(Balancer<?> balancer)
ClassEnum
isInstance
in interface ClassEnum<Balancer<?>>
balancer
- an instanceClassEnum.isInstance(java.lang.Object)
public Balancer<?> newInstance() throws java.lang.Exception
ClassEnum
newInstance
in interface ClassEnum<Balancer<?>>
java.lang.Exception
- if a new instance could not be instantiated.ClassEnum.newInstance()
public static Balancer<?> deserialize(java.lang.String id) throws java.lang.Exception
id
- an enumerated balancer identifierjava.lang.Exception
- if specified balancer identifier is invalid