fulmine.context
Interface IContextWatchdog


public interface IContextWatchdog

A component that monitors the state of an IFrameworkContext. This reports whether the context is healthy and is typically queried by an AbstractConnectionDiscoverer before sending out a heartbeat. The isContextHealthy() method is invoked each time to determine if a heartbeat should be sent out. This mechanism allows application code to effectively disconnect the context from other contexts as it will miss the allowed number of heartbeats.

On each heartbeat, this component is also informed whether the system is operating as normal or is suffering from resource/thread starvation. The resource/thread status is reported generally by measuring the expected heartbeat period against the actual period.

Author:
Ramon Servadei

Method Summary
 void cpuResourcesLow()
          Informs this component that the context is low on CPU resource; there is some form of CPU time/resource starvation occurring for the context threads.
 boolean isContextHealthy()
          Indicates whether the IFrameworkContext is healthy or not.
 void systemNormal()
          Informs this component that the context is operating as normal and heartbeats are being broadcasted at the required period.
 

Method Detail

isContextHealthy

boolean isContextHealthy()
Indicates whether the IFrameworkContext is healthy or not. Reasons why it may not be healthy are:

Returns:
true if the context is healthy and a heartbeat should be sent out, false otherwise.

cpuResourcesLow

void cpuResourcesLow()
Informs this component that the context is low on CPU resource; there is some form of CPU time/resource starvation occurring for the context threads.

This is not an absolute indication, it is called every time the heartbeat period is exceeded by the AbstractConnectionDiscoverer.

See Also:
systemNormal()

systemNormal

void systemNormal()
Informs this component that the context is operating as normal and heartbeats are being broadcasted at the required period.

See Also:
cpuResourcesLow()


Copyright © 2007-2009. All Rights Reserved.