-
com.grapecity.documents.excel
-
- AsyncCustomFunction
- BaseCellType
- ButtonCellType
- CalcReference
- CancellationToken
- CancellationTokenSource
- CellColorSortField
- CellDecoration
- CellDecorationIcon
- CellInfo
- CellPadding
- CheckBoxCellType
- CheckBoxListCellType
- Color
- ColorUtilities
- ComboBoxCellItem
- ComboBoxCellType
- CornerFold
- CsvOpenOptions
- CsvParseContext
- CsvParseResult
- CsvSaveOptions
- CustomBorderStyle
- CustomFunction
- DataImportOptions
- DataImportResult
- DataValidationJsonError
- DateInfo
- DeserializationOptions
- DocumentProperties
- Event
- EventArgs
- FindOptions
- FontColorSortField
- FontInfo
- FormulaJsonError
- HyperLinkCellType
- IconSortField
- ImageSaveOptions
- ImageSource
- JsonError
- Margin
- OpenOptionsBase
- PageContentInfo
- PageInfo
- PagePrintedEventArgs
- PagePrintEventArgs
- PagePrintingEventArgs
- PageSettings
- Parameter
- PasteOption
- PdfSaveOptions
- PdfSecurityOptions
- PivotFilterOptions
- Point
- PrintManager
- RadioButtonListCellType
- RangeEventArgs
- RangeFindReplace
- RangeFindReplace.FindReplaceImpl
- RangePartialClasses
- RangePartialClasses.FindReplaceImpl
- RangeTemplateCellType
- Rectangle
- RepeatSetting
- ReplaceOptions
- SaveOptionsBase
- SelectFieldItem
- SerializationOptions
- SheetEventArgs
- SignatureDetails
- Size
- SjsOpenOptions
- SjsSaveOptions
- SortFieldBase
- SpecialCellsValue
- TableStyleFactory
- TextFormatInfo
- Theme
- Themes
- ThemeStorage
- ValueSortField
- WebRequestResult
- Workbook
- WorkbookOptions
- WriteProtection
- XlsmOpenOptions
- XlsmSaveOptions
- XlsxOpenOptions
- XlsxSaveOptions
- XltxOpenOptions
- XltxSaveOptions
-
- com.grapecity.documents.excel.drawing
- com.grapecity.documents.excel.expressions
- com.grapecity.documents.excel.forms
- com.grapecity.documents.excel.template
- com.grapecity.documents.excel.template.DataSource
(Showing Draft Content)
CancellationTokenSource
Class CancellationTokenSource
java.lang.Object
com.grapecity.documents.excel.CancellationTokenSource
- All Implemented Interfaces:
AutoCloseable
A
CancellationTokenSource allows you to issue cancellation requests to one or more methods.To use a token source: - Create a token source.
- Attach the token to one or more operations by passing the return value of
getToken()as parameter. - Later, you can cancel the associated operations by calling
cancel()on this token source.
This class is thread safe.
- API Note:
- You must call the
close()method when you don't need to use it anymore.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Initiates cancel request.voidcancelAfter(Duration delay) Schedules a cancel operation on thisCancellationTokenSourceafter the specified time span.voidclose()Closes the resource and performs cleanup operations.getToken()Returns a token associated with thisCancellationTokenSource.
-
Constructor Details
-
CancellationTokenSource
public CancellationTokenSource()
-
-
Method Details
-
cancel
public void cancel()Initiates cancel request. All operations that have been associated with this token will be cancelled.It is assumed that the consumers of
getToken()will do 'best-effort' attempt to perform cancellation.This method returns immediately and if the cancellation is successful the cancelled operation will throwCancellationException. -
cancelAfter
Schedules a cancel operation on thisCancellationTokenSourceafter the specified time span.- Parameters:
delay- The time span to wait before canceling thisCancellationTokenSource. This value can't be null.
-
getToken
Returns a token associated with thisCancellationTokenSource.- Returns:
- The cancellation token. Always returns the same instance.
-
close
Closes the resource and performs cleanup operations.- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-