public class AtmosConfig extends AbstractConfig
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CONTEXT |
context, disableSslValidation, endpoints, loadBalancingAlgorithm, resolveCount, threadEndpoint
Constructor and Description |
---|
AtmosConfig()
Creates a new instance with default parameters.
|
AtmosConfig(java.lang.String tokenId,
java.lang.String secretKey,
java.net.URI... endpoints)
Creates a new instance with default parameters and the specified tokenId, secretKey and endpoint(s).
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxRetries()
Returns the maximum number of retry attempts before bubbling the exception back to calling code.
|
java.lang.String |
getProxyPassword()
Gets the password to use for the HTTP proxy
|
java.net.URI |
getProxyUri()
Returns the HTTP proxy used for communication to Atmos
|
java.lang.String |
getProxyUser()
Gets the username to use for the HTTP proxy
|
int |
getRetryBufferSize()
Returns the buffer size used for non-repeatable object content (input streams) when retry is enabled.
|
int |
getRetryDelayMillis()
Returns the delay in milliseconds to wait between retry attempts.
|
byte[] |
getSecretKey()
Returns the secret key as a byte array.
|
long |
getServerClockSkew()
Returns the estimated clock skew between the local machine and the Atmos cloud (if set).
|
java.lang.String |
getTokenId()
Returns the full Atmos token ID
|
boolean |
isEnableExpect100Continue()
Returns whether the Expect: 100-continue header is enabled for object write requests
|
boolean |
isEnableRetry()
Returns whether 500 errors and IOExceptions should be automatically retried.
|
void |
setEnableExpect100Continue(boolean enableExpect100Continue)
Sets whether the Expect: 100-continue header should be used for object write requests.
|
void |
setEnableRetry(boolean enableRetry)
Sets whether 500 errors and IOExceptions should be automatically retried.
|
void |
setMaxRetries(int maxRetries)
Sets the maximum number of retry attempts before bubbling the exception back to calling code.
|
void |
setProxyPassword(java.lang.String proxyPassword)
Sets the password to use for the HTTP proxy
|
void |
setProxyUri(java.net.URI proxyUri)
Sets the HTTP proxy used for communication to Atmos
|
void |
setProxyUser(java.lang.String proxyUser)
Sets the username to use for the HTTP proxy
|
void |
setRetryBufferSize(int retryBufferSize)
Sets the buffer size used for non-repeatable object content (input streams) when retry is enabled.
|
void |
setRetryDelayMillis(int retryDelayMillis)
Sets the delay in milliseconds to wait between retry attempts.
|
void |
setSecretKey(byte[] secretKey)
Sets the secret key as a byte array.
|
void |
setSecretKey(java.lang.String secretKey)
Set the secret key from a base64 encoded string (this is the format typically provided to users)
|
void |
setServerClockSkew(long serverClockSkew)
Sets the estimated clock skew between the local machine and the Atmos cloud.
|
void |
setTokenId(java.lang.String tokenId)
Sets the full Atmos token ID
|
getContext, getEndpoints, getLoadBalancingAlgorithm, isDisableSslValidation, resolvePath, setContext, setDisableSslValidation, setEndpoints, setLoadBalancingAlgorithm
public static final java.lang.String DEFAULT_CONTEXT
public AtmosConfig()
public AtmosConfig(java.lang.String tokenId, java.lang.String secretKey, java.net.URI... endpoints)
public boolean isEnableExpect100Continue()
public void setEnableExpect100Continue(boolean enableExpect100Continue)
public boolean isEnableRetry()
public void setEnableRetry(boolean enableRetry)
public int getMaxRetries()
public void setMaxRetries(int maxRetries)
public int getRetryBufferSize()
public void setRetryBufferSize(int retryBufferSize)
public int getRetryDelayMillis()
public void setRetryDelayMillis(int retryDelayMillis)
public byte[] getSecretKey()
public void setSecretKey(byte[] secretKey)
public void setSecretKey(java.lang.String secretKey)
public long getServerClockSkew()
public void setServerClockSkew(long serverClockSkew)
AtmosApi.calculateServerClockSkew()
. Implementations should set this
automatically on their local config instances when this method is called.public java.lang.String getTokenId()
public void setTokenId(java.lang.String tokenId)
public java.net.URI getProxyUri()
public void setProxyUri(java.net.URI proxyUri)
public java.lang.String getProxyUser()
public void setProxyUser(java.lang.String proxyUser)
public java.lang.String getProxyPassword()
public void setProxyPassword(java.lang.String proxyPassword)