public class IoTask extends Object implements Callable<Result>
FileUploader
 and FileDownloader classes.
 This class models a single background tasks running in a thread.
 It implements the Callable interface and the overridden
 call() method is the one that executes the main logic in this
 class. Depending on the value of the instance variable opMode it
 calls either the upload() or the download() method.| Constructor and Description | 
|---|
| IoTask(GPUdb db,
      OpMode opMode,
      String jobId,
      String fileName,
      UploadOptions uploadOptions,
      DownloadOptions downloadOptions,
      long taskNumber,
      ByteBuffer dataBytes)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| Result | call()This method is called automatically the thread in which the current
 instance of this class runs. | 
| MultiPartDownloadInfo | getMultiPartDownloadInfo() | 
| MultiPartUploadInfo | getMultiPartUploadInfo() | 
| void | setMultiPartDownloadInfo(MultiPartDownloadInfo multiPartDownloadInfo) | 
| void | setMultiPartUploadInfo(MultiPartUploadInfo multiPartUploadInfo) | 
public IoTask(GPUdb db, OpMode opMode, String jobId, String fileName, UploadOptions uploadOptions, DownloadOptions downloadOptions, long taskNumber, ByteBuffer dataBytes)
opMode - - Identifies whether this task is an upload/downloadjobId - - Identifies the upload/download job that created this taskfileName - - String - Name of the file to be uploaded/downloadeduploadOptions - public Result call()
public void setMultiPartUploadInfo(MultiPartUploadInfo multiPartUploadInfo)
public void setMultiPartDownloadInfo(MultiPartDownloadInfo multiPartDownloadInfo)
public MultiPartUploadInfo getMultiPartUploadInfo()
public MultiPartDownloadInfo getMultiPartDownloadInfo()
Copyright © 2024. All rights reserved.