Logo Search packages:      
Sourcecode: jets3t version File versions  Download package

abstract int org::jets3t::service::S3Service::checkBucketStatus ( String  bucketName  )  throws S3ServiceException [pure virtual]

Find out the status of an S3 bucket with the given name. This method is only implemented in the org.jets3t.service.impl.rest.httpclient.RestS3Service client.

Warning! S3 can act strangely when you use this method in some circumstances. If you check the status of a bucket and find that it does not exist, then create the bucket, S3 will continue to tell you the bucket does not exists for up to 30 seconds. This problem has something to do with connection caching (I think).

This S3 quirk makes it a bad idea to use this method to check for a bucket's existence before creating that bucket. Use the getOrCreateBucket(String) method for this purpose instead.

Parameters:
bucketName 
Returns:
BUCKET_STATUS__MY_BUCKET if you already own the bucket, BUCKET_STATUS__DOES_NOT_EXIST if the bucket does not yet exist in S3, or BUCKET_STATUS__ALREADY_CLAIMED if someone else has already created a bucket with the given name.
Exceptions:
S3ServiceException 

Implemented in org::jets3t::service::impl::rest::httpclient::RestS3Service, and org::jets3t::service::impl::soap::axis::SoapS3Service.


Generated by  Doxygen 1.6.0   Back to index