public enum MasterSlaveRegistry extends Enum<MasterSlaveRegistry>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
addMasterSlaveListener(String jobName,
MasterSlaveListener masterSlaveListener)
starts a new thread to control master/slave state.
|
boolean |
isAlive(String jobName) |
boolean |
removeMasterSlaveListener(String jobName)
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 jobName, MasterSlaveListener masterSlaveListener)
jobName - - logical jobName of the work unit. you can call this method multiple times with different jobNames and listener and each unique call will create a new threadmasterSlaveListener - - the listener you implement to get callbackspublic boolean isAlive(String jobName)
jobName - - the jobNamepublic boolean removeMasterSlaveListener(String jobName)
jobName - logical jobName of the work unitCopyright © 2016 Cisco. All rights reserved.