Package com.zendesk.maxwell.util
Class RunLoopProcess
- java.lang.Object
-
- com.zendesk.maxwell.util.RunLoopProcess
-
- All Implemented Interfaces:
StoppableTask
- Direct Known Subclasses:
BinlogConnectorReplicator
,BootstrapController
,MysqlSchemaCompactor
,PositionStoreThread
public abstract class RunLoopProcess extends Object implements StoppableTask
-
-
Field Summary
Fields Modifier and Type Field Description protected StoppableTaskState
taskState
-
Constructor Summary
Constructors Constructor Description RunLoopProcess()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
awaitStop(Long timeout)
protected void
beforeStart()
protected void
beforeStop()
void
interrupt()
void
requestStop()
void
runLoop()
protected abstract void
work()
-
-
-
Field Detail
-
taskState
protected volatile StoppableTaskState taskState
-
-
Method Detail
-
requestStop
public void requestStop()
- Specified by:
requestStop
in interfaceStoppableTask
-
interrupt
public void interrupt()
-
awaitStop
public void awaitStop(Long timeout) throws TimeoutException
- Specified by:
awaitStop
in interfaceStoppableTask
- Throws:
TimeoutException
-
-