Package org.apache.hadoop.fs.s3a.impl
Class PutObjectOptions
java.lang.Object
org.apache.hadoop.fs.s3a.impl.PutObjectOptions
Extensible structure for options when putting/writing objects.
-
Constructor Summary
ConstructorsConstructorDescriptionPutObjectOptions(String storageClass, Map<String, String> headers, EnumSet<WriteObjectFlags> writeObjectFlags, String etagOverwrite) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PutObjectOptionsGet the default options.Get the ETag that must match for an overwrite operation to proceed.Headers for the put/post request.booleanhasFlag(WriteObjectFlags flag) Does the flag set contain the specific flag.booleanGet the isEtagOverwrite flag.booleanGet the noObjectOverwrite flag.toString()
-
Constructor Details
-
PutObjectOptions
public PutObjectOptions(@Nullable String storageClass, @Nullable Map<String, String> headers, EnumSet<WriteObjectFlags> writeObjectFlags, @Nullable String etagOverwrite) Constructor.- Parameters:
storageClass- Storage class, if not null.headers- Headers; may be null.writeObjectFlags- flags for writingetagOverwrite- etag for etag writes. MUST not be empty if etag overwrite flag is set.
-
-
Method Details
-
isNoObjectOverwrite
public boolean isNoObjectOverwrite()Get the noObjectOverwrite flag.- Returns:
- true if object override not allowed.
-
isEtagOverwrite
public boolean isEtagOverwrite()Get the isEtagOverwrite flag.- Returns:
- true if the write MUST overwrite an object with the supplied etag.
-
hasFlag
Does the flag set contain the specific flag.- Parameters:
flag- flag to look for- Returns:
- true if the flag is set.
-
getEtagOverwrite
Get the ETag that must match for an overwrite operation to proceed.- Returns:
- The ETag required for overwrite, or
nullif no ETag match is required.
-
getHeaders
Headers for the put/post request.- Returns:
- headers or null.
-
getWriteObjectFlags
-
toString
-
defaultOptions
Get the default options.- Returns:
- an instance with no storage class or headers.
-