类 CopyObjectRequest


  • public class CopyObjectRequest
    extends GenericObjectRequest
    Provides options for copying an Baidu Bos object from a source location to a new destination.

    All CopyObjectRequests must specify a source bucket and key, along with a destination bucket and key.

    • 构造器详细资料

      • CopyObjectRequest

        public CopyObjectRequest​(String sourceBucketName,
                                 String sourceKey,
                                 String bucketName,
                                 String key)
        Constructs a new CopyObjectRequest with only basic options.
        参数:
        sourceBucketName - The name of the Bos bucket containing the object to copy.
        sourceKey - The source bucket key under which the object to copy is stored.
        bucketName - The name of the Bos bucket to which the new object will be copied.
        key - The destination bucket key under which the new object will be copied.
    • 方法详细资料

      • getSourceBucketName

        public String getSourceBucketName()
        Gets the name of the bucket containing the source object to be copied.
        返回:
        The name of the bucket containing the source object to be copied.
      • setSourceBucketName

        public void setSourceBucketName​(String sourceBucketName)
        Sets the name of the bucket containing the source object to be copied.
        参数:
        sourceBucketName - The name of the bucket containing the source object to be copied.
      • withSourceBucketName

        public CopyObjectRequest withSourceBucketName​(String sourceBucketName)
        Sets the name of the bucket containing the source object to be copied, and returns this object, enabling additional method calls to be chained together.
        参数:
        sourceBucketName - The name of the bucket containing the source object to be copied.
        返回:
        This CopyObjectRequest instance, enabling additional method calls to be chained together.
      • getSourceKey

        public String getSourceKey()
        Gets the source bucket key under which the source object to be copied is stored.
        返回:
        The source bucket key under which the source object to be copied is stored.
      • setSourceKey

        public void setSourceKey​(String sourceKey)
        Sets the source bucket key under which the source object to be copied is stored.
        参数:
        sourceKey - The source bucket key under which the source object to be copied is stored.
      • withSourceKey

        public CopyObjectRequest withSourceKey​(String sourceKey)
        Sets the key in the source bucket under which the source object to be copied is stored and returns this object, enabling additional method calls to be chained together.
        参数:
        sourceKey - The key in the source bucket under which the source object to be copied is stored.
        返回:
        This CopyObjectRequest instance, enabling additional method calls to be chained together.
      • withBucketName

        public CopyObjectRequest withBucketName​(String bucketName)
        Sets the name of the destination bucket which will contain the new, copied object and returns this object, enabling additional method calls to be chained together.
        指定者:
        withBucketName 在类中 GenericBucketRequest
        参数:
        bucketName - The name of the destination bucket which will contain the new, copied object.
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • withKey

        public CopyObjectRequest withKey​(String key)
        Sets the destination bucket key under which the new, copied object will be stored and returns this object, enabling additional method calls can be chained together.
        指定者:
        withKey 在类中 GenericObjectRequest
        参数:
        key - The destination bucket key under which the new, copied object will be stored.
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getNewObjectMetadata

        public ObjectMetadata getNewObjectMetadata()
        Gets the optional object metadata to set for the new, copied object.
        返回:
        The object metadata to set for the newly copied object. Returns null if no object metadata has been specified.
      • setNewObjectMetadata

        public void setNewObjectMetadata​(ObjectMetadata newObjectMetadata)
        Sets the object metadata to use for the new, copied object. By default the object metadata from the source object is copied to the destination object, but when setting object metadata with this method, no metadata from the source object is copied. Instead, the new destination object will have the metadata specified with this call.
        参数:
        newObjectMetadata - The object metadata to use for the newly copied object.
      • withNewObjectMetadata

        public CopyObjectRequest withNewObjectMetadata​(ObjectMetadata newObjectMetadata)
        Sets the object metadata to use for the new, copied object and returns this object, enabling additional method calls to be chained together. By default, the object metadata from the source object will be copied to the destination object, but if callers set object metadata with this method, it will be used instead.
        参数:
        newObjectMetadata - The object metadata to use for the newly copied object.
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getETag

        public String getETag()
        Gets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.
        返回:
        The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.
      • setETag

        public void setETag​(String eTag)
        Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.
        参数:
        eTag - The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.
      • withETag

        public CopyObjectRequest withETag​(String eTag)
        Sets the optional ETag that, when present, must be a match for the source object's current ETag in order for the copy object request to be executed.
        参数:
        eTag - The optional ETag that when present must be a match for the source object's current ETag in order for this request to be executed.
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getStorageClass

        public String getStorageClass()
        Gets the storageClass of the input file which is to be copyed to Baidu Bos.
        返回:
        storageClass The storageClass is an identification that distinguish between infrequent access bos and standard bos.
      • setStorageClass

        public void setStorageClass​(String storageClass)
        Sets the storageClass of the input file which is to be copyed to Baidu Bos.
        参数:
        storageClass - The storageClass is an identification that distinguish between infrequent access bos and standard bos.
      • withStorageClass

        public CopyObjectRequest withStorageClass​(String storageClass)
        Sets the storageClass of the input file which is to be copyed to Baidu Bos.
        参数:
        storageClass - The StorageClass is an identification that distinguish between infrequent access bos and standard bos.
        返回:
        This CopyObjectRequest, so that additional method calls can be chained together.
      • getUnmodifiedSinceConstraint

        public String getUnmodifiedSinceConstraint()
        Gets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.
        返回:
        unmodifiedSinceConstraint
      • setUnmodifiedSinceConstraint

        public void setUnmodifiedSinceConstraint​(String unmodifiedSinceConstraint)
        Sets the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.
        参数:
        unmodifiedSinceConstraint - the value of the unmodifiedSinceConstraint
      • withUnmodifiedSinceConstraint

        public CopyObjectRequest withUnmodifiedSinceConstraint​(String unmodifiedSinceConstraint)
        Sets the the value of the unmodifiedSinceConstraint,if the value is equal to or later than the actual file modification time, then take the normal file transfer process.
        参数:
        unmodifiedSinceConstraint - the value of the unmodifiedSinceConstraint
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getModifiedSinceConstraint

        public String getModifiedSinceConstraint()
        Gets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.
        返回:
        modifiedSinceConstraint
      • setModifiedSinceConstraint

        public void setModifiedSinceConstraint​(String modifiedSinceConstraint)
        Sets the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.
        参数:
        modifiedSinceConstraint - the value of the modifiedSinceConstraint
      • withModifiedSinceConstraint

        public CopyObjectRequest withModifiedSinceConstraint​(String modifiedSinceConstraint)
        Sets the the value of the modifiedSinceConstraint,if the value is less than the actual file modification time, then take the normal file transfer process.
        参数:
        modifiedSinceConstraint - the value of the modifiedSinceConstraint
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getNoneMatchETagConstraint

        public String getNoneMatchETagConstraint()
        Gets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.
        返回:
        noneMatchETagConstraint
      • setNoneMatchETagConstraint

        public void setNoneMatchETagConstraint​(String noneMatchETagConstraint)
        Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.
        参数:
        noneMatchETagConstraint - the constraint value
      • withNoMatchingETagConstraint

        public CopyObjectRequest withNoMatchingETagConstraint​(String noneMatchETagConstraint)
        Sets the optional ETag that, when present, must be not a match for the source object's current ETag in order for the copy object request to be executed.
        参数:
        noneMatchETagConstraint - the constraint value
        返回:
        This CopyObjectRequest, enabling additional method calls to be chained together.
      • getTrafficLimitBitPS

        public long getTrafficLimitBitPS()
        Gets the limit of put object speed.
        返回:
        the limit of put object speed. unit: bit/s
      • setTrafficLimitBitPS

        public void setTrafficLimitBitPS​(long trafficLimitBitPS)
        Sets Gets the limit of put object speed. range: 819200 bit/s ~ 838860800 bit/s
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s
      • withTrafficLimitBitPS

        public CopyObjectRequest withTrafficLimitBitPS​(long trafficLimitBitPS)
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s, range: 819200 bit/s ~ 838860800 bit/s
        返回:
        This PutObjectRequest, so that additional method calls can be chained together