com.caucho.health.predicate
Class IfNotRecent
java.lang.Object
com.caucho.health.predicate.AbstractHealthPredicate
com.caucho.health.predicate.IfNotRecent
- All Implemented Interfaces:
- HealthActionListener, HealthActionAware, HealthPredicate
@Configurable
public class IfNotRecent
- extends AbstractHealthPredicate
- implements HealthActionAware, HealthActionListener
Qualifies an action to match at most an amount of time after the last execution.
<health:HttpStatusHealthCheck ee:Named="httpStatusCheck">
<url>http://localhost:8080/test-ping.jsp</url>
</health:HttpStatusHealthCheck>
<health:DumpHeap>
<health:IfHealthCritical healthCheck="${httpStatusCheck}"/>
<health:IfNotRecent time='5m'/>
</health:DumpHeap>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IfNotRecent
public IfNotRecent()
init
@PostConstruct
public void init()
setAction
public void setAction(HealthAction action)
- Specified by:
setAction in interface HealthActionAware
setTime
@Configurable
public void setTime(Period time)
- The time before the action can execute again.
- Parameters:
time -
beforeAction
public void beforeAction(HealthAction action,
HealthService healthService)
- Specified by:
beforeAction in interface HealthActionListener
afterAction
public void afterAction(HealthAction action,
HealthService healthService)
- Specified by:
afterAction in interface HealthActionListener
isMatch
public boolean isMatch(HealthEvent healthEvent)
- Description copied from class:
AbstractHealthPredicate
- The abstract match returns true, so a child can combine its own
matches with the parent. See AbstractScheduledCheckPredicate for a
case where the parent
isMatch doesn't return true.
- Specified by:
isMatch in interface HealthPredicate- Overrides:
isMatch in class AbstractHealthPredicate
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractHealthPredicate