类 DownloadFileRequest
java.lang.Object
com.obs.services.model.GenericRequest
com.obs.services.model.BaseObjectRequest
com.obs.services.model.DownloadFileRequest
Parameters in a request for downloading a file
-
字段概要
从类继承的字段 com.obs.services.model.BaseObjectRequest
encodeHeaders, isIgnorePort, objectKey从类继承的字段 com.obs.services.model.GenericRequest
bucketName, cancelHandler, httpMethod, userHeaders -
构造器概要
构造器构造器说明DownloadFileRequest(String bucketName, String objectKey) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile) ConstructorDownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile, String versionId) Constructor -
方法概要
修饰符和类型方法说明Obtain the control option of the read-ahead cache.File used to record download progresses in resumable modeObtain the path to the to-be-downloaded file.Obtain the ETag verification conditions for downloading the object.Obtain the time conditions set for downloading the object.Obtain the ETag verification conditions for downloading the object.Obtain the time conditions for downloading the object.longObtain the part size.longObtain the callback threshold of the data transfer listener.Obtain the data transfer listener.intObtain the maximum number of threads used for processing download tasks concurrently.Obtain the temporary file generated during the download.longgetTtl()Obtain the cache data expiration time.Obtain the object version ID.booleanIdentify whether the resumable mode is enabled.booleanvoidsetCacheOption(CacheOptionEnum cacheOption) Set the control option of the read-ahead cache.voidsetCheckpointFile(String checkpointFile) Specify a file used to record resumable download progresses.voidsetDownloadFile(String downloadFile) Set the path to the to-be-downloaded file.voidsetEnableCheckpoint(boolean enableCheckpoint) Specify whether to enable the resumable mode.voidsetIfMatchTag(String ifMatchTag) Set the ETag verification conditions for downloading the object.voidsetIfModifiedSince(Date ifModifiedSince) Set the time conditions set for downloading the object.voidsetIfNoneMatchTag(String ifNoneMatchTag) Set the ETag verification conditions for downloading the object.voidsetIfUnmodifiedSince(Date ifUnmodifiedSince) Set the time conditions for downloading the object.voidsetNeedCalculateCRC64(boolean needCalculateCRC64) voidsetPartSize(long partSize) Set the part size.voidsetProgressInterval(long progressInterval) Set the callback threshold of the data transfer listener.voidsetProgressListener(ProgressListener progressListener) Set the data transfer listener.voidsetTaskNum(int taskNum) Set the maximum number of threads used for processing download tasks concurrently.voidsetTtl(long ttl) Set the cache data expiration time.voidsetVersionId(String versionId) Set the version ID of the object.toString()从类继承的方法 com.obs.services.model.BaseObjectRequest
getIsIgnorePort, getObjectKey, isEncodeHeaders, setIsEncodeHeaders, setIsIgnorePort, setObjectKey从类继承的方法 com.obs.services.model.GenericRequest
addUserHeaders, getBucketName, getCancelHandler, getHttpMethod, getUserHeaders, isRequesterPays, setBucketName, setCancelHandler, setRequesterPays, setUserHeaders
-
构造器详细资料
-
DownloadFileRequest
-
DownloadFileRequest
-
DownloadFileRequest
-
DownloadFileRequest
public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum) Constructor- 参数:
bucketName- Bucket nameobjectKey- Object namedownloadFile- Path to the to-be-downloaded filepartSize- Part sizetaskNum- Maximum number of threads used for processing download tasks concurrently
-
DownloadFileRequest
public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint) Constructor- 参数:
bucketName- Bucket nameobjectKey- Object namedownloadFile- Path to the to-be-downloaded filepartSize- Part sizetaskNum- Maximum number of threads used for processing download tasks concurrentlyenableCheckpoint- Whether to enable the resumable mode
-
DownloadFileRequest
public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile) Constructor- 参数:
bucketName- Bucket nameobjectKey- Object namedownloadFile- Path to the to-be-downloaded filepartSize- Part sizetaskNum- Maximum number of threads used for processing download tasks concurrentlyenableCheckpoint- Whether to enable the resumable modecheckpointFile- File used to record download progresses in resumable mode
-
DownloadFileRequest
public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile, String versionId) Constructor- 参数:
bucketName- Bucket nameobjectKey- Object namedownloadFile- Path to the to-be-downloaded filepartSize- Part sizetaskNum- Maximum number of threads used for processing download tasks concurrentlyenableCheckpoint- Whether to enable the resumable modecheckpointFile- File used to record download progresses in resumable modeversionId- Version ID of the object
-
-
方法详细资料
-
getDownloadFile
Obtain the path to the to-be-downloaded file.- 返回:
- Path to the to-be-downloaded file
-
setDownloadFile
Set the path to the to-be-downloaded file.- 参数:
downloadFile- Path to the to-be-downloaded file
-
getPartSize
public long getPartSize()Obtain the part size.- 返回:
- Part size
-
setPartSize
public void setPartSize(long partSize) Set the part size.- 参数:
partSize- Part size
-
getTaskNum
public int getTaskNum()Obtain the maximum number of threads used for processing download tasks concurrently.- 返回:
- Maximum number of threads used for processing download tasks concurrently
-
setTaskNum
public void setTaskNum(int taskNum) Set the maximum number of threads used for processing download tasks concurrently.- 参数:
taskNum- Maximum number of threads used for processing download tasks concurrently
-
isEnableCheckpoint
public boolean isEnableCheckpoint()Identify whether the resumable mode is enabled.- 返回:
- Identifier specifying whether the resumable mode is enabled
-
setEnableCheckpoint
public void setEnableCheckpoint(boolean enableCheckpoint) Specify whether to enable the resumable mode.- 参数:
enableCheckpoint- Identifier specifying whether the resumable mode is enabled
-
getCheckpointFile
File used to record download progresses in resumable mode- 返回:
- File used to record the download progress
-
setCheckpointFile
Specify a file used to record resumable download progresses.- 参数:
checkpointFile- File used to record the download progress
-
getTempDownloadFile
Obtain the temporary file generated during the download.- 返回:
- Temporary file generated during the download
-
getIfModifiedSince
Obtain the time conditions set for downloading the object. Only when the object is modified after the point in time specified by this parameter, it will be downloaded. Otherwise, "304 Not Modified" will be returned.- 返回:
- Time condition set for downloading the object
-
setIfModifiedSince
Set the time conditions set for downloading the object. Only when the object is modified after the point in time specified by this parameter, it will be downloaded. Otherwise, "304 Not Modified" will be returned.- 参数:
ifModifiedSince- Time condition set for downloading the object
-
getIfUnmodifiedSince
Obtain the time conditions for downloading the object. Only when the object remains unchanged after the point in time specified by this parameter, it will be downloaded; otherwise, "412 Precondition Failed" will be returned.- 返回:
- Time condition set for downloading the object
-
setIfUnmodifiedSince
Set the time conditions for downloading the object. Only when the object remains unchanged after the point in time specified by this parameter, it will be downloaded; otherwise, "412 Precondition Failed" will be returned.- 参数:
ifUnmodifiedSince- Time condition set for downloading the object
-
getIfMatchTag
Obtain the ETag verification conditions for downloading the object. Only when the ETag of the object is the same as that specified by this parameter, the object will be downloaded. Otherwise, "412 Precondition Failed" will be returned.- 返回:
- ETag verification condition set for downloading the object
-
setIfMatchTag
Set the ETag verification conditions for downloading the object. Only when the ETag of the object is the same as that specified by this parameter, the object will be downloaded. Otherwise, "412 Precondition Failed" will be returned.- 参数:
ifMatchTag- ETag verification condition set for downloading the object
-
getIfNoneMatchTag
Obtain the ETag verification conditions for downloading the object. Only when the ETag of the object is different from that specified by this parameter, the object will be downloaded. Otherwise, "304 Not Modified" will be returned.- 返回:
- ETag verification condition set for downloading the object
-
setIfNoneMatchTag
Set the ETag verification conditions for downloading the object. Only when the ETag of the object is different from that specified by this parameter, the object will be downloaded. Otherwise, "304 Not Modified" will be returned.- 参数:
ifNoneMatchTag- ETag verification condition set for downloading the object
-
getVersionId
-
setVersionId
Set the version ID of the object.- 参数:
versionId- Version ID of the object
-
getProgressListener
Obtain the data transfer listener.- 返回:
- Data transfer listener
-
setProgressListener
Set the data transfer listener.- 参数:
progressListener- Data transfer listener
-
getProgressInterval
public long getProgressInterval()Obtain the callback threshold of the data transfer listener. The default value is 100 KB.- 返回:
- Callback threshold of the data transfer listener
-
setProgressInterval
public void setProgressInterval(long progressInterval) Set the callback threshold of the data transfer listener. The default value is 100 KB.- 参数:
progressInterval- Callback threshold of the data transfer listener
-
getCacheOption
Obtain the control option of the read-ahead cache.- 返回:
- Control option of the read-ahead cache
-
setCacheOption
Set the control option of the read-ahead cache.- 参数:
cacheOption- Control option of the read-ahead cache
-
getTtl
public long getTtl()Obtain the cache data expiration time.- 返回:
- Cache data expiration time
-
setTtl
public void setTtl(long ttl) Set the cache data expiration time.- 参数:
ttl- Cache data expiration time
-
isNeedCalculateCRC64
public boolean isNeedCalculateCRC64()- 返回:
- Whether you need sdk to calculate CRC64 value and compare it with CRC64 returned by server
-
setNeedCalculateCRC64
public void setNeedCalculateCRC64(boolean needCalculateCRC64) - 参数:
needCalculateCRC64- Whether you need sdk to calculate CRC64 value and compare it with CRC64 returned by server
-
toString
- 覆盖:
toString在类中BaseObjectRequest
-