Class DeadMansSwitch
- java.lang.Object
-
- de.unistuttgart.isw.sfsc.commonjava.util.DeadMansSwitch
-
- All Implemented Interfaces:
NotThrowingAutoCloseable,java.lang.AutoCloseable
public final class DeadMansSwitch extends java.lang.Object implements NotThrowingAutoCloseable
-
-
Method Summary
Modifier and Type Method Description HandleaddOnDeceaseListener(java.lang.Runnable runnable)voidclose()static DeadMansSwitchcreate(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, int rateMs)voidkeepAlive()
-
-
-
Method Detail
-
create
public static DeadMansSwitch create(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, int rateMs)
-
addOnDeceaseListener
public Handle addOnDeceaseListener(java.lang.Runnable runnable)
-
keepAlive
public void keepAlive()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceNotThrowingAutoCloseable
-
-