public enum MasterSlaveRegistry extends Enum<MasterSlaveRegistry>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
addMasterSlaveListener(String name,
MasterSlaveListener masterSlaveListener)
starts a new thread to control master/slave state.
|
boolean |
removeMasterSlaveListener(String name)
remove a listener and stop its thread.
|
static MasterSlaveRegistry |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MasterSlaveRegistry[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MasterSlaveRegistry INSTANCE
public static MasterSlaveRegistry[] values()
for (MasterSlaveRegistry c : MasterSlaveRegistry.values()) System.out.println(c);
public static MasterSlaveRegistry valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void addMasterSlaveListener(String name, MasterSlaveListener masterSlaveListener)
name - - logical name of the work unit. you can call this method multiple times with different names and listener and each unique call will create a new threadmasterSlaveListener - - the listener you implement to get callbackspublic boolean removeMasterSlaveListener(String name)
name - logical name of the work unitCopyright © 2016 Cisco. All rights reserved.