共用方式為


FileRequestOptions Class

  • java.lang.Object

public class FileRequestOptions extends RequestOptions

Represents a set of options that may be specified on a request.

Constructor Summary

Constructor Description
FileRequestOptions()

Creates an instance of the class.

FileRequestOptions(final FileRequestOptions other)

Creates an instance of the class by copying values from another instance.

Method Summary

Modifier and Type Method and Description
void applyDefaults(final FileRequestOptions modifiedOptions)

Applies defaults to the options passed in.

Integer getConcurrentRequestCount()

Gets the concurrent number of simultaneous requests per operation. For more information about concurrent request count defaults, see setConcurrentRequestCount(final Integer concurrentRequestCount).

Boolean getDisableContentMD5Validation()

Gets whether download and FileInputStream methods should ignore the file's ContentMD5 header. For more information about disabling content MD5 validation defaults, see setDisableContentMD5Validation(final Boolean disableContentMD5Validation)

Boolean getStoreFileContentMD5()

Gets whether the file's ContentMD5 header should be set on uploads. For more information about storing file content MD5 defaults, see setStoreFileContentMD5(final Boolean storeFileContentMD5) .

Boolean getUseTransactionalContentMD5()

Gets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security. All partial file uploads or downloads will be restricted to 4 MB. For more information about transactional content MD5 defaults, see setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5).

final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client)

Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.

final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client, final boolean setStartTime)

Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.

void setConcurrentRequestCount(final Integer concurrentRequestCount)

Sets the concurrent number of simultaneous requests per operation.

The default concurrent request count is set in the client and is by default 1, indicating no concurrency. You can change the concurrent request count on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that concurrent request count.

void setDisableContentMD5Validation(final Boolean disableContentMD5Validation)

Sets whether download and FileInputStream methods should ignore the file's ContentMD5 header.

The default disableContentMD5Validation value is set in the client and is by default . You can change the disableContentMD5Validation value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that disableContentMD5Validation value.

final void setLocationMode(final LocationMode locationMode)

Sets the LocationMode for this request.

The default LocationMode is set in the client and is by default PRIMARY_ONLY. You can change the LocationMode on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that LocationMode.

void setRequireEncryption(Boolean requireEncryption)

Encryption is not supported for files.

void setStoreFileContentMD5(final Boolean storeFileContentMD5)

Sets whether the file's ContentMD5 header should be set on uploads.

The default storeFileContentMD5 value is set in the client and is by default . You can change the storeFileContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that storeFileContentMD5 value.

void setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5)

Sets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security.

The default useTransactionalContentMD5 value is set in the client and is by default . You can change the useTransactionalContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that useTransactionalContentMD5 value.

Inherited Members

Constructor Details

FileRequestOptions

public FileRequestOptions()

Creates an instance of the class.

FileRequestOptions

public FileRequestOptions(final FileRequestOptions other)

Creates an instance of the class by copying values from another instance.

Parameters:

other - A FileRequestOptions object which represents the file request options to copy.

Method Details

applyDefaults

protected static void applyDefaults(final FileRequestOptions modifiedOptions)

Applies defaults to the options passed in.

Parameters:

modifiedOptions - The options to apply defaults to.

getConcurrentRequestCount

public Integer getConcurrentRequestCount()

Gets the concurrent number of simultaneous requests per operation. For more information about concurrent request count defaults, see setConcurrentRequestCount(final Integer concurrentRequestCount).

Returns:

the concurrentRequestCount

getDisableContentMD5Validation

public Boolean getDisableContentMD5Validation()

Gets whether download and FileInputStream methods should ignore the file's ContentMD5 header. For more information about disabling content MD5 validation defaults, see setDisableContentMD5Validation(final Boolean disableContentMD5Validation)

Returns:

the disableContentMD5Validation

getStoreFileContentMD5

public Boolean getStoreFileContentMD5()

Gets whether the file's ContentMD5 header should be set on uploads. For more information about storing file content MD5 defaults, see setStoreFileContentMD5(final Boolean storeFileContentMD5) .

Returns:

the storeFileContentMD5

getUseTransactionalContentMD5

public Boolean getUseTransactionalContentMD5()

Gets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security. All partial file uploads or downloads will be restricted to 4 MB. For more information about transactional content MD5 defaults, see setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5).

Returns:

the useTransactionalContentMD5

populateAndApplyDefaults

protected static final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client)

Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.

Parameters:

options - The input options to copy from when applying defaults
client - A CloudFileClient object that represents the service client used to set the default timeout interval and retry policy, if they are null. Additionally, the default value of concurrentRequestCount is 1.

populateAndApplyDefaults

protected static final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client, final boolean setStartTime)

Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.

Parameters:

options - The input options to copy from when applying defaults
client - A CloudFileClient object that represents the service client used to set the default timeout interval and retry policy, if they are null. Additionally, the default value of concurrentRequestCount is 1.
setStartTime - whether to initialize the startTimeInMs field, or not

setConcurrentRequestCount

public void setConcurrentRequestCount(final Integer concurrentRequestCount)

Sets the concurrent number of simultaneous requests per operation.

The default concurrent request count is set in the client and is by default 1, indicating no concurrency. You can change the concurrent request count on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that concurrent request count.

Parameters:

concurrentRequestCount - the concurrentRequestCount to set

setDisableContentMD5Validation

public void setDisableContentMD5Validation(final Boolean disableContentMD5Validation)

Sets whether download and FileInputStream methods should ignore the file's ContentMD5 header.

The default disableContentMD5Validation value is set in the client and is by default . You can change the disableContentMD5Validation value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that disableContentMD5Validation value.

Parameters:

disableContentMD5Validation - the disableContentMD5Validation to set

setLocationMode

public final void setLocationMode(final LocationMode locationMode)

Sets the LocationMode for this request.

The default LocationMode is set in the client and is by default PRIMARY_ONLY. You can change the LocationMode on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that LocationMode.

Parameters:

locationMode - the locationMode to set

setRequireEncryption

public void setRequireEncryption(Boolean requireEncryption)

Encryption is not supported for files.

Parameters:

requireEncryption - A value to indicate whether all data written and read must be encrypted.

setStoreFileContentMD5

public void setStoreFileContentMD5(final Boolean storeFileContentMD5)

Sets whether the file's ContentMD5 header should be set on uploads.

The default storeFileContentMD5 value is set in the client and is by default . You can change the storeFileContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that storeFileContentMD5 value.

Parameters:

storeFileContentMD5 - the storeFileContentMD5 to set

setUseTransactionalContentMD5

public void setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5)

Sets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security.

The default useTransactionalContentMD5 value is set in the client and is by default . You can change the useTransactionalContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that useTransactionalContentMD5 value.

Parameters:

useTransactionalContentMD5 - the useTransactionalContentMD5 to set

Applies to