Package com.aspose.zip
Class CancellationFlag
- java.lang.Object
-
- com.aspose.zip.CancellationFlag
-
- All Implemented Interfaces:
AutoCloseable
public class CancellationFlag extends Object implements AutoCloseable
The flag that allows for the cancellation of operations.
-
-
Constructor Summary
Constructors Constructor Description CancellationFlag()Constructs a CancellationFlag instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels the operation associated with thisCancellationFlaginstance.voidcancelAfter(long delay)Cancels the operation after a specified delay in milliseconds.voidcancelAfter(long delay, TimeUnit unit)Cancels the operation after a specified delay in the given time unit.voidclose()Closes theCancellationFlaginstance and releases any resources associated with it.
-
-
-
Method Detail
-
cancel
public void cancel()
Cancels the operation associated with thisCancellationFlaginstance.If the operation is already cancelled, this method does nothing.
-
cancelAfter
public void cancelAfter(long delay)
Cancels the operation after a specified delay in milliseconds.- Parameters:
delay- The delay in milliseconds after which the operation will be cancelled.
-
cancelAfter
public void cancelAfter(long delay, TimeUnit unit)Cancels the operation after a specified delay in the given time unit.- Parameters:
delay- The delay after which the operation will be cancelled.unit- The time unit of the delay parameter.
-
close
public void close()
Closes theCancellationFlaginstance and releases any resources associated with it.- Specified by:
closein interfaceAutoCloseable
-
-