Interface Pausable
- All Known Implementing Classes:
Context
public interface Pausable
Implemented by objects that can be paused and resumed during transaction processing.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the configured pause timeout.pause()Pauses execution and returns aFuturethat resolves to the resume result.voidreset()Resets the pause state so this object can be reused.voidresume(int result) Resumes a paused execution with the given result code.voidsetTimeout(long timeoutInMillis) Sets the maximum pause duration.
-
Method Details
-
setTimeout
Sets the maximum pause duration.- Parameters:
timeoutInMillis- timeout in milliseconds
-
getTimeout
-
pause
Pauses execution and returns aFuturethat resolves to the resume result.- Returns:
- a Future resolving to the result code passed to
resume(int)
-
resume
Resumes a paused execution with the given result code.- Parameters:
result- the result code to deliver to the waiting Future
-
reset
void reset()Resets the pause state so this object can be reused.
-