|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.task.ServerRegistry
Represents the set of Lighthouse servers that share a repository (typically, although not necessarily, clustered by an application server).
Each Lighthouse task scheduler records its heartbeat
in the repository.
A host whose heartbeat is overdue
beyond a configurable number
of intervals
can be declared legally dead
.
Every active scheduler will periodically attempt to
detect any newly failed server
.
An active server that is shut down in an orderly manner will change its own state to inactive. Once an inactive server is restarted, its scheduler automatically re-registers the server, which changes its state back to active.
Neither an inactive server nor a failed server
is automatically removed from the list of known servers.
An administrator who intends to remove a server
from the list of known servers
must explicitly de-register
that server.
Field Summary | |
static java.lang.String |
code_id
|
static java.lang.String |
DEAD_AFTER_INTERVALS
The name of a SystemConfiguration property that specifies how many intervals one should wait
before considering a server legally dead. |
static long |
DEFAULT_DEAD_AFTER_INTERVALS
Default value for DEAD_AFTER_INTERVALS . |
static long |
DEFAULT_HEARTBEAT_INTERVAL
Default value for HEARTBEAT_INTERVAL . |
static java.lang.String |
HEARTBEAT_INTERVAL
The name of a SystemConfiguration property that specifies how often a server's heartbeat is expected. |
protected static Trace |
trace
|
Constructor Summary | |
ServerRegistry()
|
Method Summary | |
static void |
activate(LighthouseContext lh,
java.lang.String serverName)
Mark the ServerRegistry entry as ACTIVE for the specified server name. |
static void |
deactivate(LighthouseContext lh,
java.lang.String serverName)
Mark the ServerRegistry entry as INACTIVE for the specified server name. |
static void |
deRegister(LighthouseContext lh,
java.lang.String serverName)
Remove any ServerRegistry entry for the specified server name. |
static java.util.List |
detectNewlyFailedServers(LighthouseContext lh)
|
static java.lang.String[] |
getActiveServers(LighthouseContext lh)
Returns a list of all active servers. |
static long |
getDeadAfterIntervals(LighthouseContext lh)
|
static long |
getHeartBeatIntervalSeconds(LighthouseContext lh)
Common code. |
static java.lang.String[] |
getKnownServers(LighthouseContext lh)
Returns an array of known server names. |
static java.lang.String[] |
getNewlyFailedServers(LighthouseContext lh)
Returns a list of all the newly failed servers. |
static java.util.List |
listActiveServers(LighthouseContext lh)
|
static java.util.List |
listKnownServers(LighthouseContext lh)
|
static void |
register(LighthouseContext lh,
java.lang.String serverName)
Add (or update the heartbeat in) a ServerRegistry entry for the specified server name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
protected static final Trace trace
public static final java.lang.String HEARTBEAT_INTERVAL
public static final java.lang.String DEAD_AFTER_INTERVALS
intervals
one should wait
before considering a server legally dead.
public static final long DEFAULT_HEARTBEAT_INTERVAL
HEARTBEAT_INTERVAL
.
public static final long DEFAULT_DEAD_AFTER_INTERVALS
DEAD_AFTER_INTERVALS
.
Constructor Detail |
public ServerRegistry()
Method Detail |
public static void register(LighthouseContext lh, java.lang.String serverName) throws WavesetException
WavesetException
public static void activate(LighthouseContext lh, java.lang.String serverName) throws WavesetException
WavesetException
public static void deactivate(LighthouseContext lh, java.lang.String serverName) throws WavesetException
WavesetException
public static void deRegister(LighthouseContext lh, java.lang.String serverName) throws WavesetException
WavesetException
public static java.util.List listActiveServers(LighthouseContext lh) throws WavesetException
WavesetException
public static java.util.List detectNewlyFailedServers(LighthouseContext lh) throws WavesetException
WavesetException
public static java.util.List listKnownServers(LighthouseContext lh) throws WavesetException
WavesetException
public static long getHeartBeatIntervalSeconds(LighthouseContext lh) throws WavesetException
WavesetException
public static long getDeadAfterIntervals(LighthouseContext lh) throws WavesetException
WavesetException
public static java.lang.String[] getKnownServers(LighthouseContext lh) throws WavesetException
WavesetException
public static java.lang.String[] getActiveServers(LighthouseContext lh) throws WavesetException
WavesetException
public static java.lang.String[] getNewlyFailedServers(LighthouseContext lh) throws WavesetException
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |