Modifier and Type | Class and Description |
---|---|
static class |
ViPRS3Client.GetFileAccessResultUnmarshaller |
static class |
ViPRS3Client.ListDataNodesResultUnmarshaller |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
IP_ADDRESS_PATTERN |
protected java.lang.String |
namespace |
Constructor and Description |
---|
ViPRS3Client(java.lang.String endpoint,
com.amazonaws.auth.AWSCredentials awsCredentials)
Constructs a new ViPR S3 client using the specified endpoint, AWS credentials to
access the EMC ViPR S3 protocol.
|
ViPRS3Client(java.lang.String endpoint,
com.amazonaws.auth.AWSCredentials awsCredentials,
com.amazonaws.ClientConfiguration clientConfiguration)
Constructs a new ViPR S3 client using the specified endpoint, AWS credentials and
client configuration to access the EMC ViPR S3 protocol.
|
ViPRS3Client(java.lang.String endpoint,
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider)
Constructs a new ViPR S3 client using the specified endpoint, AWS credentials
provider to access the EMC ViPR S3 protocol.
|
ViPRS3Client(java.lang.String endpoint,
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider,
com.amazonaws.ClientConfiguration clientConfiguration)
Constructs a new ViPR S3 client using the specified endpoint, AWS credentials and
client configuration to access the EMC ViPR S3 protocol.
|
ViPRS3Client(ViPRS3Config viprConfig)
Constructs a client with all options specified in a ViPRS3Config instance.
|
Modifier and Type | Method and Description |
---|---|
AppendObjectResult |
appendObject(AppendObjectRequest request)
Appends to an existing object.
|
AppendObjectResult |
appendObject(java.lang.String bucketName,
java.lang.String key,
java.io.File file)
Appends to an existing object.
|
AppendObjectResult |
appendObject(java.lang.String bucketName,
java.lang.String key,
java.io.InputStream input,
com.amazonaws.services.s3.model.ObjectMetadata metadata)
Appends to an existing object.
|
protected java.net.URI |
convertToVirtualHostEndpoint(java.lang.String namespace,
java.lang.String bucketName)
Converts the current endpoint set for this client into virtual addressing
style, by placing the name of the specified bucket and namespace before the S3
endpoint.
|
com.amazonaws.services.s3.model.Bucket |
createBucket(ViPRCreateBucketRequest createBucketRequest)
ViPR-specific create bucket command.
|
protected <X extends com.amazonaws.AmazonWebServiceRequest> |
createRequest(java.lang.String bucketName,
java.lang.String key,
X originalRequest,
com.amazonaws.http.HttpMethodName httpMethod)
Overridden to specify the namespace via vHost or header.
|
protected com.amazonaws.auth.Signer |
createSigner(com.amazonaws.Request<?> request,
java.lang.String bucketName,
java.lang.String key)
Overridden to provide our own signer, which will include x-emc headers and namespace in the signature.
|
protected com.amazonaws.services.s3.model.ObjectMetadata |
doPut(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest)
Executes a (Subclass of) PutObjectRequest.
|
BucketFileAccessModeResult |
getBucketFileAccessMode(java.lang.String bucketName)
Checks the current file access mode on a bucket.
|
GetFileAccessResult |
getFileAccess(GetFileAccessRequest getFileAccessRequest)
Gets file access information for the keys in a bucket.
|
com.netflix.loadbalancer.LoadBalancerStats |
getLoadBalancerStats() |
java.lang.String |
getNamespace()
Gets the current ViPR namespace for this client.
|
protected boolean |
isVHostRequest(com.amazonaws.Request<?> request) |
protected java.lang.String |
join(java.lang.String delimiter,
java.util.List<?> values) |
protected java.lang.String |
join(java.lang.String delimiter,
java.lang.Object... values) |
ListDataNodesResult |
listDataNodes(ListDataNodesRequest listDataNodesRequest)
Lists all active ViPR data services nodes (hosts) in the ViPR cluster.
|
BucketFileAccessModeResult |
setBucketFileAccessMode(SetBucketFileAccessModeRequest putAccessModeRequest)
Initiates a set file access mode request on a bucket.
|
void |
setNamespace(java.lang.String namespace)
Sets the ViPR namespace to use for this client.
|
UpdateObjectResult |
updateObject(java.lang.String bucketName,
java.lang.String key,
java.io.File file,
long startOffset)
Updates an existing object.
|
UpdateObjectResult |
updateObject(java.lang.String bucketName,
java.lang.String key,
java.io.InputStream input,
com.amazonaws.services.s3.model.ObjectMetadata metadata,
long startOffset)
Updates an existing object.
|
UpdateObjectResult |
updateObject(UpdateObjectRequest request)
Updates an existing object.
|
abortMultipartUpload, addAclHeaders, assertParameterNotNull, changeObjectStorageClass, completeMultipartUpload, copyObject, copyObject, copyPart, createBucket, createBucket, createBucket, createBucket, createExecutionContext, deleteBucket, deleteBucket, deleteBucketCrossOriginConfiguration, deleteBucketCrossOriginConfiguration, deleteBucketLifecycleConfiguration, deleteBucketLifecycleConfiguration, deleteBucketPolicy, deleteBucketPolicy, deleteBucketTaggingConfiguration, deleteBucketTaggingConfiguration, deleteBucketWebsiteConfiguration, deleteBucketWebsiteConfiguration, deleteObject, deleteObject, deleteObjects, deleteVersion, deleteVersion, doesBucketExist, fireProgressEvent, generatePresignedUrl, generatePresignedUrl, generatePresignedUrl, getBucketAcl, getBucketAcl, getBucketCrossOriginConfiguration, getBucketLifecycleConfiguration, getBucketLocation, getBucketLocation, getBucketLoggingConfiguration, getBucketNotificationConfiguration, getBucketPolicy, getBucketPolicy, getBucketTaggingConfiguration, getBucketVersioningConfiguration, getBucketWebsiteConfiguration, getBucketWebsiteConfiguration, getCachedResponseMetadata, getObject, getObject, getObject, getObjectAcl, getObjectAcl, getObjectMetadata, getObjectMetadata, getRegion, getResourceUrl, getS3AccountOwner, getUrl, initiateMultipartUpload, invoke, listBuckets, listBuckets, listMultipartUploads, listNextBatchOfObjects, listNextBatchOfVersions, listObjects, listObjects, listObjects, listParts, listVersions, listVersions, listVersions, populateRequestMetadata, presignRequest, putObject, putObject, putObject, restoreObject, restoreObject, setBucketAcl, setBucketAcl, setBucketAcl, setBucketAcl, setBucketAcl, setBucketCrossOriginConfiguration, setBucketCrossOriginConfiguration, setBucketLifecycleConfiguration, setBucketLifecycleConfiguration, setBucketLoggingConfiguration, setBucketNotificationConfiguration, setBucketNotificationConfiguration, setBucketPolicy, setBucketPolicy, setBucketTaggingConfiguration, setBucketTaggingConfiguration, setBucketVersioningConfiguration, setBucketWebsiteConfiguration, setBucketWebsiteConfiguration, setEndpoint, setObjectAcl, setObjectAcl, setObjectAcl, setObjectAcl, setObjectAcl, setObjectAcl, setObjectRedirectLocation, setRegion, setS3ClientOptions, uploadPart
addRequestHandler, addRequestHandler, configSigner, configSigner, convertToHttpRequest, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setConfiguration, setEndpoint, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abortMultipartUpload, changeObjectStorageClass, completeMultipartUpload, copyObject, copyObject, copyPart, createBucket, createBucket, createBucket, createBucket, deleteBucket, deleteBucket, deleteBucketCrossOriginConfiguration, deleteBucketCrossOriginConfiguration, deleteBucketLifecycleConfiguration, deleteBucketLifecycleConfiguration, deleteBucketPolicy, deleteBucketPolicy, deleteBucketTaggingConfiguration, deleteBucketTaggingConfiguration, deleteBucketWebsiteConfiguration, deleteBucketWebsiteConfiguration, deleteObject, deleteObject, deleteObjects, deleteVersion, deleteVersion, doesBucketExist, generatePresignedUrl, generatePresignedUrl, generatePresignedUrl, getBucketAcl, getBucketAcl, getBucketCrossOriginConfiguration, getBucketLifecycleConfiguration, getBucketLocation, getBucketLocation, getBucketLoggingConfiguration, getBucketNotificationConfiguration, getBucketPolicy, getBucketPolicy, getBucketTaggingConfiguration, getBucketVersioningConfiguration, getBucketWebsiteConfiguration, getBucketWebsiteConfiguration, getCachedResponseMetadata, getObject, getObject, getObject, getObjectAcl, getObjectAcl, getObjectMetadata, getObjectMetadata, getS3AccountOwner, initiateMultipartUpload, listBuckets, listBuckets, listMultipartUploads, listNextBatchOfObjects, listNextBatchOfVersions, listObjects, listObjects, listObjects, listParts, listVersions, listVersions, listVersions, putObject, putObject, putObject, restoreObject, restoreObject, setBucketAcl, setBucketAcl, setBucketAcl, setBucketCrossOriginConfiguration, setBucketCrossOriginConfiguration, setBucketLifecycleConfiguration, setBucketLifecycleConfiguration, setBucketLoggingConfiguration, setBucketNotificationConfiguration, setBucketNotificationConfiguration, setBucketPolicy, setBucketPolicy, setBucketTaggingConfiguration, setBucketTaggingConfiguration, setBucketVersioningConfiguration, setBucketWebsiteConfiguration, setBucketWebsiteConfiguration, setEndpoint, setObjectAcl, setObjectAcl, setObjectAcl, setObjectAcl, setObjectRedirectLocation, setRegion, setS3ClientOptions, uploadPart
protected static final java.lang.String IP_ADDRESS_PATTERN
protected java.lang.String namespace
public ViPRS3Client(java.lang.String endpoint, com.amazonaws.auth.AWSCredentials awsCredentials)
endpoint
- The ViPR S3 endpoint (i.e. "https://vipr-data.emc.com:9021")awsCredentials
- The AWS credentials to use when making requests
with this client.AmazonS3Client.AmazonS3Client()
,
AmazonS3Client.AmazonS3Client(AWSCredentials)
public ViPRS3Client(java.lang.String endpoint, com.amazonaws.auth.AWSCredentials awsCredentials, com.amazonaws.ClientConfiguration clientConfiguration)
endpoint
- The ViPR S3 endpoint (i.e. "https://vipr-data.emc.com:9021")awsCredentials
- The AWS credentials to use when making requests
with this client.clientConfiguration
- The client configuration options controlling how this client
connects (e.g. proxy settings, retry counts, etc).AmazonS3Client.AmazonS3Client()
,
AmazonS3Client.AmazonS3Client(AWSCredentials, ClientConfiguration)
public ViPRS3Client(java.lang.String endpoint, com.amazonaws.auth.AWSCredentialsProvider credentialsProvider)
endpoint
- The ViPR S3 endpoint (i.e. "https://vipr-data.emc.com:9021")credentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests.AmazonS3Client.AmazonS3Client(AWSCredentialsProvider)
public ViPRS3Client(java.lang.String endpoint, com.amazonaws.auth.AWSCredentialsProvider credentialsProvider, com.amazonaws.ClientConfiguration clientConfiguration)
endpoint
- The ViPR S3 endpoint (i.e. "https://vipr-data.emc.com:9021")credentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests.clientConfiguration
- The client configuration options controlling how this client
connects (e.g. proxy settings, retry counts, etc).public ViPRS3Client(ViPRS3Config viprConfig)
public com.netflix.loadbalancer.LoadBalancerStats getLoadBalancerStats()
public UpdateObjectResult updateObject(java.lang.String bucketName, java.lang.String key, java.io.File file, long startOffset) throws com.amazonaws.AmazonClientException
ViPRS3
updateObject
in interface ViPRS3
bucketName
- The name of an existing bucket, to which you have
Permission.Write
permission.key
- The key in the bucket to update.file
- The file containing the data to use for the update.startOffset
- The starting offset within the object to apply the update.UpdateObjectResult
containing the data returned from
ViPR.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public UpdateObjectResult updateObject(java.lang.String bucketName, java.lang.String key, java.io.InputStream input, com.amazonaws.services.s3.model.ObjectMetadata metadata, long startOffset) throws com.amazonaws.AmazonClientException
ViPRS3
updateObject
in interface ViPRS3
bucketName
- The name of an existing bucket, to which you have
Permission.Write
permission.key
- The key in the bucket to update.input
- The input stream containing the data to be uploaded.metadata
- Additional metadata for the upload. Generally, the most
important property here is the Content-Length of the input
stream. If you do not size the input stream, the client will
be forced to buffer the entire stream into memory and size it
before uploading. This can lead to OutOfMemoryError
s.startOffset
- The starting offset within the object to apply the update.UpdateObjectResult
containing the data returned from
ViPR.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public UpdateObjectResult updateObject(UpdateObjectRequest request) throws com.amazonaws.AmazonClientException
ViPRS3
updateObject
in interface ViPRS3
request
- The configured UpdateObjectRequest
to execute.UpdateObjectResult
containing the data returned from
ViPR.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public AppendObjectResult appendObject(java.lang.String bucketName, java.lang.String key, java.io.File file) throws com.amazonaws.AmazonClientException
ViPRS3
AppendObjectResult.getAppendOffset()
. If you must append at an
exact location, use updateObject but note in that case with concurrent
writes, the last writer will "win".appendObject
in interface ViPRS3
bucketName
- The name of an existing bucket, to which you have
Permission.Write
permission.key
- The key in the bucket to append to.file
- The file containing the data to use for the append.AppendObjectResult
containing the data returned from
ViPR including the actual append offset.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public AppendObjectResult appendObject(java.lang.String bucketName, java.lang.String key, java.io.InputStream input, com.amazonaws.services.s3.model.ObjectMetadata metadata) throws com.amazonaws.AmazonClientException
ViPRS3
AppendObjectResult.getAppendOffset()
. If you must append at an
exact location, use updateObject but note in that case with concurrent
writes, the last writer will "win".appendObject
in interface ViPRS3
bucketName
- The name of an existing bucket, to which you have
Permission.Write
permission.key
- The key in the bucket to append to.input
- The input stream containing the data to be appended.metadata
- Additional metadata for the upload. Generally, the most
important property here is the Content-Length of the input
stream. If you do not size the input stream, the client will
be forced to buffer the entire stream into memory and size it
before sending. This can lead to OutOfMemoryError
s.AppendObjectResult
containing the data returned from
ViPR including the actual append offset.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public AppendObjectResult appendObject(AppendObjectRequest request) throws com.amazonaws.AmazonClientException
ViPRS3
AppendObjectResult.getAppendOffset()
. If you must append at an
exact location, use updateObject but note in that case with concurrent
writes, the last writer will "win".appendObject
in interface ViPRS3
request
- the configured AppendObjectRequest
to execute.AppendObjectResult
containing the data returned from
ViPR including the actual append offset.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public BucketFileAccessModeResult setBucketFileAccessMode(SetBucketFileAccessModeRequest putAccessModeRequest) throws com.amazonaws.AmazonClientException
ViPRS3
setBucketFileAccessMode
in interface ViPRS3
putAccessModeRequest
- The configured SetBucketFileAccessModeRequest
request
to execute.BucketFileAccessModeResult
containing the results of the access mode change.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request. Generally, this will happen if the given transition
is not valid.public BucketFileAccessModeResult getBucketFileAccessMode(java.lang.String bucketName) throws com.amazonaws.AmazonClientException
ViPRS3
getBucketFileAccessMode
in interface ViPRS3
bucketName
- the name of the bucket to check.BucketFileAccessModeResult
object containing the
current file access mode for the bucket.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public GetFileAccessResult getFileAccess(GetFileAccessRequest getFileAccessRequest) throws com.amazonaws.AmazonClientException
ViPRS3
GetFileAccessResult.isTruncated()
.getFileAccess
in interface ViPRS3
getFileAccessRequest
- the configured GetFileAccessRequest
request to
execute.GetFileAccessResult
object containing the object file
access information.com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.public ListDataNodesResult listDataNodes(ListDataNodesRequest listDataNodesRequest) throws com.amazonaws.AmazonClientException
ViPRS3
listDataNodes
in interface ViPRS3
listDataNodesRequest
- the configured ListDataNodesRequest
request to
execute.ListDataNodesResult
object containing the list of data services endpoints (hosts).com.amazonaws.AmazonClientException
- If any errors are encountered in the client while making the
request or handling the response.com.amazonaws.AmazonServiceException
- If any errors occurred in on the server while processing the
request.protected <X extends com.amazonaws.AmazonWebServiceRequest> com.amazonaws.Request<X> createRequest(java.lang.String bucketName, java.lang.String key, X originalRequest, com.amazonaws.http.HttpMethodName httpMethod)
createRequest
in class com.amazonaws.services.s3.AmazonS3Client
protected com.amazonaws.auth.Signer createSigner(com.amazonaws.Request<?> request, java.lang.String bucketName, java.lang.String key)
createSigner
in class com.amazonaws.services.s3.AmazonS3Client
protected boolean isVHostRequest(com.amazonaws.Request<?> request)
protected java.net.URI convertToVirtualHostEndpoint(java.lang.String namespace, java.lang.String bucketName)
namespace
- The namespace to use in the virtual addressing style
of the returned URI.bucketName
- The name of the bucket to use in the virtual addressing style
of the returned URI.protected com.amazonaws.services.s3.model.ObjectMetadata doPut(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest)
putObjectRequest
- the request to executepublic java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
namespace
- the namespace to setpublic com.amazonaws.services.s3.model.Bucket createBucket(ViPRCreateBucketRequest createBucketRequest) throws com.amazonaws.AmazonClientException, com.amazonaws.AmazonServiceException
createBucketRequest
- the configuration parameters for the new bucket.com.amazonaws.AmazonClientException
com.amazonaws.AmazonServiceException
protected java.lang.String join(java.lang.String delimiter, java.util.List<?> values)
protected java.lang.String join(java.lang.String delimiter, java.lang.Object... values)