com.caucho.health.action
Class FailSafeRestart

java.lang.Object
  extended by com.caucho.health.action.AbstractHealthAction
      extended by com.caucho.health.action.FailSafeRestart
All Implemented Interfaces:
HealthAction

@Singleton
@Configurable
public class FailSafeRestart
extends AbstractHealthAction

Health action to trigger a timed restart of Resin, normally used in conjunction with an ActionSequence to gather shutdown information.

<health:ActionSequence>
   <health:FailSafeRestart timeout="10m">
   <health:DumpThreads/>
   <health:DumpHeap/>
   <health:StartProfiler active-time="5m"/>
   <health:Restart/>
   
   <health:IfHealthCritical time="5m"/>
 </health:ActionSequence>
 


Constructor Summary
FailSafeRestart()
           
 
Method Summary
 void doActionImpl(HealthEvent healthEvent)
           
 long getTimeoutMillis()
           
 void setTimeout(Period timeout)
          Time to force a restart if one has not yet occurred
 void setTimeoutMillis(long timeout)
          Time to force a restart if one has not yet occurred
 
Methods inherited from class com.caucho.health.action.AbstractHealthAction
add, addListener, doAction, getPredicates, init, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FailSafeRestart

public FailSafeRestart()
Method Detail

setTimeout

@Configurable
public void setTimeout(Period timeout)
Time to force a restart if one has not yet occurred

Parameters:
timeout - as a Period

setTimeoutMillis

@Configurable
public void setTimeoutMillis(long timeout)
Time to force a restart if one has not yet occurred

Parameters:
timeout - in milliseconds

getTimeoutMillis

public long getTimeoutMillis()

doActionImpl

public void doActionImpl(HealthEvent healthEvent)
Specified by:
doActionImpl in class AbstractHealthAction