public final class RequestClientOptions
extends java.lang.Object
AmazonWebServiceRequest
s.Modifier and Type | Class and Description |
---|---|
static class |
RequestClientOptions.Marker |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_STREAM_BUFFER_SIZE
Used to enable mark-and-reset for
non-mark-and-resettable non-file input stream for up to 128K memory
buffering by default.
|
private java.util.EnumMap<RequestClientOptions.Marker,java.lang.String> |
markers |
private int |
readLimit
Used for mark-and-reset purposes during retry.
|
Constructor and Description |
---|
RequestClientOptions() |
Modifier and Type | Method and Description |
---|---|
void |
appendUserAgent(java.lang.String userAgent)
Appends a user agent to the USER_AGENT client marker.
|
(package private) void |
copyTo(RequestClientOptions target)
Copy the internal states of this
RequestClientOptions to the
target RequestClientOptions . |
private java.lang.String |
createUserAgentMarkerString(java.lang.String marker,
java.lang.String userAgent)
Appends the given client marker string to the existing one and returns it.
|
java.lang.String |
getClientMarker(RequestClientOptions.Marker marker)
Returns the value of the specified marker; or null if there is no such
value.
|
int |
getReadLimit()
Returns the mark-and-reset read limit; defaults to
131073.
|
void |
putClientMarker(RequestClientOptions.Marker marker,
java.lang.String value)
Associates the given value with the given marker.
|
void |
setReadLimit(int readLimit)
Sets the optional mark-and-reset read limit used for signing and retry
purposes.
|
public static final int DEFAULT_STREAM_BUFFER_SIZE
DEFAULT_STREAM_BUFFER_SIZE
bytes would
fail to reset the underlying input stream as the mark position would
have been invalidated.private final java.util.EnumMap<RequestClientOptions.Marker,java.lang.String> markers
private int readLimit
public java.lang.String getClientMarker(RequestClientOptions.Marker marker)
public void putClientMarker(RequestClientOptions.Marker marker, java.lang.String value)
RequestClientOptions.Marker.USER_AGENT
is only intended for internal use
by the AWS SDK.public void appendUserAgent(java.lang.String userAgent)
private java.lang.String createUserAgentMarkerString(java.lang.String marker, java.lang.String userAgent)
public final int getReadLimit()
InputStream.mark(int)
public final void setReadLimit(int readLimit)
InputStream.mark(int)
void copyTo(RequestClientOptions target)
RequestClientOptions
to the
target RequestClientOptions
.