Package com.jsql.model.suspendable
Class AbstractSuspendable
java.lang.Object
com.jsql.model.suspendable.AbstractSuspendable
- Direct Known Subclasses:
SuspendableGetCharInsertion
,SuspendableGetIndexes
,SuspendableGetRows
,SuspendableGetVendor
A thread used to inject database ; stoppable and pausable.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isPaused()
Return true if thread is paused, false otherwise.boolean
Thread's states Pause and Stop are processed by this method.
- Pause action in infinite loop if invoked while shouldPauseThread is set to true,
- Return stop state.void
pause()
Mark as paused.void
resume()
Wake threads.abstract String
The pausable/stoppable action.void
stop()
Mark as stopped.void
unpause()
Mark as unpaused.
-
Field Details
-
injectionModel
-
-
Constructor Details
-
AbstractSuspendable
-
-
Method Details
-
run
The pausable/stoppable action.- Parameters:
args
-- Returns:
- Throws:
JSqlException
-
isSuspended
public boolean isSuspended()Thread's states Pause and Stop are processed by this method.
- Pause action in infinite loop if invoked while shouldPauseThread is set to true,
- Return stop state.- Returns:
- Stop state
-
stop
public void stop()Mark as stopped. -
pause
public void pause()Mark as paused. -
unpause
public void unpause()Mark as unpaused. -
isPaused
public boolean isPaused()Return true if thread is paused, false otherwise.- Returns:
- Pause state
-
resume
public void resume()Wake threads.
-