Class TimeoutCancelCheck
java.lang.Object
com.complexible.common.cancellation.TimeoutCancelCheck
- All Implemented Interfaces:
CancelCheck
A cancellation check that cancels automatically if a timeout has been reached or delegates to another check timeout
has not occurred.
-
Field Summary
Fields inherited from interface com.complexible.common.cancellation.CancelCheck
DUMMY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck()Check if cancellation point is valid; It throws an exception in case if the cancellation point has been canceled.Returns null if the process has not been cancelled, otherwise the cancellation cause (if set).booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.complexible.common.cancellation.CancelCheck
check, throwIfCancelled
-
Constructor Details
-
TimeoutCancelCheck
-
-
Method Details
-
check
public void check()Description copied from interface:CancelCheckCheck if cancellation point is valid; It throws an exception in case if the cancellation point has been canceled.- Specified by:
checkin interfaceCancelCheck
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancelCheck- Returns:
- true if point has been cancelled, false otherwise;
-
getCancellationMessage
Description copied from interface:CancelCheckReturns null if the process has not been cancelled, otherwise the cancellation cause (if set).- Specified by:
getCancellationMessagein interfaceCancelCheck
-