Public Member Functions | Package Functions

alma.ACS.MasterComponentImpl.SubsysResourceMonitor.ResourceErrorHandler< T > Interface Reference

Inheritance diagram for alma.ACS.MasterComponentImpl.SubsysResourceMonitor.ResourceErrorHandler< T >:
alma.ACS.MasterComponentImpl.MasterComponentImplBase.DefaultResourceErrorHandler< T >

List of all members.

Public Member Functions

abstract void badState (T resource, String stateName)
abstract void resourceRecovered (T resource)

Package Functions

abstract boolean resourceUnreachable (T resource)

Detailed Description

Error handler that gets notified when a monitored resource becomes unavailable or degraded.

By implementing a custom error handler, a master component can attempt first to cure the situation, or go into ERROR state by calling doTransition(SubsystemStateEvent.SUBSYSEVENT_ERROR);.


Member Function Documentation

abstract void alma.ACS.MasterComponentImpl.SubsysResourceMonitor.ResourceErrorHandler< T >.badState ( T  resource,
String  stateName 
) [pure virtual]

Called when SubsysResourceMonitor was found in a bad state, but still replied in time.

Parameters:
resource The resource object is passed to allow using one handler for many resources.
stateName Name of the bad state the resource was found in. If the resource does not support named states, it may return any String that indicates the problem. For example, PingableResourceChecker} returns "ping() failed." which is then used as the stateName.
See also:
ResourceChecker.checkState()

Implemented in alma.ACS.MasterComponentImpl.MasterComponentImplBase.DefaultResourceErrorHandler< T >.

abstract void alma.ACS.MasterComponentImpl.SubsysResourceMonitor.ResourceErrorHandler< T >.resourceRecovered ( T  resource  )  [pure virtual]

Notification that the monitored resource has recovered after a previous failure or timeout. This notification can only work if monitoring has continued after the problem was detected, which is always the case for badState problems, but depends on the return value of resourceUnreachable in case of timeout. problems.

Since:
ACS 8.0.0 (has existed in sub-interface RecoverableResourceErrorHandler since 6.0.3)

Implemented in alma.ACS.MasterComponentImpl.MasterComponentImplBase.DefaultResourceErrorHandler< T >.

abstract boolean alma.ACS.MasterComponentImpl.SubsysResourceMonitor.ResourceErrorHandler< T >.resourceUnreachable ( T  resource  )  [package, pure virtual]

Called when the resource could not be reached at all because of a timeout or network/middleware communication errors. The resource object is passed to allow using one handler for many resources.

The return value controls whether monitoring of this resource will be stopped:

  1. true means that the error handler decided that this resource is unreachable beyond repair, and that no further monitoring calls should be made. This can avoid potential problems with an increasing number of hanging calls and eventually stopping the respective threads.
  2. false means that monitoring calls should continue.

Implemented in alma.ACS.MasterComponentImpl.MasterComponentImplBase.DefaultResourceErrorHandler< T >.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties