|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.gms.bootstrap.HealthHistory
public final class HealthHistory
Used to hold cluster history. This information is backed by a ConcurrentMap, so iterating over the instances is "weakly consistent" as the state could change at any time (especially during cluster startup).
| Nested Class Summary | |
|---|---|
static class |
HealthHistory.InstanceHealth
|
static class |
HealthHistory.STATE
|
| Field Summary | |
|---|---|
static long |
NOTIME
Used when no time information is known, for instance at cluster startup before an instance has started. |
| Constructor Summary | |
|---|---|
HealthHistory(Cluster cluster)
Creates a health history that knows about the expected list of instances. |
|
HealthHistory(java.lang.String instanceName,
boolean keepFormerMembers)
Creates a health history that contains only the given instance. |
|
| Method Summary | |
|---|---|
org.jvnet.hk2.config.UnprocessedChangeEvents |
changed(java.beans.PropertyChangeEvent[] events)
|
HealthHistory.InstanceHealth |
getHealthByInstance(java.lang.String name)
Returns the state/time of a specific instance. |
java.util.Set<java.lang.String> |
getInstances()
Returns a copy of the instance names. |
java.util.List<java.lang.String> |
getInstancesByState(HealthHistory.STATE targetState)
The returned list may be modified without affecting the information in the HealthHistory object. |
void |
updateHealth(com.sun.enterprise.ee.cms.core.Signal signal)
Called by GMS subsystem to update the health of an instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long NOTIME
| Constructor Detail |
|---|
public HealthHistory(Cluster cluster)
cluster - Cluster config object containing the instances
public HealthHistory(java.lang.String instanceName,
boolean keepFormerMembers)
instanceName - The name of the instance to add to the
health tablekeepFormerMembers - Specifies whether or not to keep
former group members in the table when they have failed
or stopped. This value should normally be false for a
user-managed cluster unless the history is needed for
testing or debugging.| Method Detail |
|---|
public HealthHistory.InstanceHealth getHealthByInstance(java.lang.String name)
name - Name of the instance
public java.util.List<java.lang.String> getInstancesByState(HealthHistory.STATE targetState)
targetState - The desired state of the instances
public java.util.Set<java.lang.String> getInstances()
public void updateHealth(com.sun.enterprise.ee.cms.core.Signal signal)
signal - The GMS signal passed in from the GMS adapter
that is managing this objectpublic org.jvnet.hk2.config.UnprocessedChangeEvents changed(java.beans.PropertyChangeEvent[] events)
changed in interface org.jvnet.hk2.config.ConfigListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||