From 28448d462bc30af910f00bc2affb5f471a036538 Mon Sep 17 00:00:00 2001 From: adriancole Date: Tue, 9 Apr 2013 14:37:34 -0700 Subject: [PATCH] deprecated blobstore interfaces that imply complex internal code --- .../atmos/blobstore/AtmosAsyncBlobStore.java | 3 +++ .../blobstore/CloudFilesAsyncBlobStore.java | 3 +++ .../s3/blobstore/S3AsyncBlobStore.java | 3 +++ .../swift/blobstore/SwiftAsyncBlobStore.java | 3 +++ .../org/jclouds/blobstore/AsyncBlobStore.java | 5 +++- .../java/org/jclouds/blobstore/BlobMap.java | 2 ++ .../jclouds/blobstore/BlobStoreContext.java | 23 +++++++++++++++---- .../org/jclouds/blobstore/InputStreamMap.java | 2 ++ .../org/jclouds/blobstore/ListableMap.java | 2 ++ .../blobstore/LocalAsyncBlobStore.java | 4 ++++ .../internal/BaseAsyncBlobStore.java | 3 +++ .../blobstore/internal/BaseBlobMap.java | 2 ++ .../blobstore/internal/BlobMapImpl.java | 2 ++ .../internal/InputStreamMapImpl.java | 2 ++ .../aws/s3/blobstore/AWSS3AsyncBlobStore.java | 3 +++ .../blobstore/AzureAsyncBlobStore.java | 3 +++ .../HPCloudObjectStorageAsyncBlobStore.java | 3 +++ 17 files changed, 63 insertions(+), 5 deletions(-) diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java index 8918e3bc5b..0e3142a96c 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java @@ -69,7 +69,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link AtmosBlobStore} */ +@Deprecated @Singleton public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { private final AtmosAsyncClient async; diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/blobstore/CloudFilesAsyncBlobStore.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/blobstore/CloudFilesAsyncBlobStore.java index bdbd715fe7..1878e40896 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/blobstore/CloudFilesAsyncBlobStore.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/blobstore/CloudFilesAsyncBlobStore.java @@ -55,7 +55,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link CloudFilesBlobStore} */ +@Deprecated @Singleton public class CloudFilesAsyncBlobStore extends SwiftAsyncBlobStore { private final EnableCDNAndCache enableCDNAndCache; diff --git a/apis/s3/src/main/java/org/jclouds/s3/blobstore/S3AsyncBlobStore.java b/apis/s3/src/main/java/org/jclouds/s3/blobstore/S3AsyncBlobStore.java index edcd4a2065..5e468efdf2 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/blobstore/S3AsyncBlobStore.java +++ b/apis/s3/src/main/java/org/jclouds/s3/blobstore/S3AsyncBlobStore.java @@ -73,7 +73,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link S3BlobStore} */ +@Deprecated @Singleton public class S3AsyncBlobStore extends BaseAsyncBlobStore { diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java index a235be58b6..6843887abe 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java @@ -69,7 +69,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link SwiftBlobStore} */ +@Deprecated @Singleton public class SwiftAsyncBlobStore extends BaseAsyncBlobStore { private final CommonSwiftClient sync; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/AsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/AsyncBlobStore.java index cf2897988b..08a6e812fd 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/AsyncBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/AsyncBlobStore.java @@ -37,8 +37,11 @@ import com.google.common.util.concurrent.ListenableFuture; /** * Provides hooks needed to run a blob store asynchronously * - * @see AsyncBlobStore + * @see BlobStore + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link org.jclouds.blobstore.BlobStore} */ +@Deprecated public interface AsyncBlobStore { /** * @see BlobStore#getContext diff --git a/blobstore/src/main/java/org/jclouds/blobstore/BlobMap.java b/blobstore/src/main/java/org/jclouds/blobstore/BlobMap.java index ffa01a0f6a..931544414c 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/BlobMap.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/BlobMap.java @@ -31,7 +31,9 @@ import com.google.inject.ImplementedBy; * * @author Adrian Cole * + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated @ImplementedBy(BlobMapImpl.class) public interface BlobMap extends ListableMap { diff --git a/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java b/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java index 4f6b57ab3d..fa2cc2b539 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/BlobStoreContext.java @@ -53,7 +53,9 @@ public interface BlobStoreContext extends Closeable, View { * @param options * allow you to specify a directory within the container, or whether to list * recursively. + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ + @Deprecated InputStreamMap createInputStreamMap(String container, ListContainerOptions options); /** @@ -64,7 +66,9 @@ public interface BlobStoreContext extends Closeable, View { * * @param container * existing container you wish to read or modify + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ + @Deprecated InputStreamMap createInputStreamMap(String container); /** @@ -76,24 +80,33 @@ public interface BlobStoreContext extends Closeable, View { * @param options * allow you to specify a directory within the container, or whether to list * recursively. + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ + @Deprecated BlobMap createBlobMap(String container, ListContainerOptions options); /** - * Creates a Map view of the specified container. Use this when you wan - * to control the content type, or manually specify length or size of blobs. + * Creates a Map view of the specified container. + * Use this when you wan to control the content type, or manually specify + * length or size of blobs. * * Only root-level blobs will be visible. * * @param container * existing container you wish to read or modify + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ + @Deprecated BlobMap createBlobMap(String container); /** - * @return a portable asynchronous interface for the BlobStore, which returns {@code Future}s for - * each call. + * @return a portable asynchronous interface for the BlobStore, which returns + * {@code Future}s for each call. + * @deprecated will be removed in jclouds 1.7, as async interfaces are no + * longer supported. Please use + * {@link #getBlobStore()} */ + @Deprecated AsyncBlobStore getAsyncBlobStore(); /** @@ -104,7 +117,9 @@ public interface BlobStoreContext extends Closeable, View { /** * * @return best guess at the consistency model used in this BlobStore. + * @deprecated will be removed in jclouds 1.7, as almost never correct. */ + @Deprecated ConsistencyModel getConsistencyModel(); diff --git a/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java b/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java index 219cb1baec..86d1c23e07 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java @@ -38,7 +38,9 @@ import com.google.inject.ImplementedBy; * {@link #putFile(String, File)} or {@link S3ObjectMap} instead. * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated @ImplementedBy(InputStreamMapImpl.class) public interface InputStreamMap extends ListableMap { public static interface Factory { diff --git a/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java b/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java index 7490d0f286..9c33598099 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java @@ -27,7 +27,9 @@ import org.jclouds.blobstore.domain.StorageMetadata; * * @author Adrian Cole * + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated public interface ListableMap extends Map { /** diff --git a/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java index 3f7fa87a23..019a891033 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java @@ -42,6 +42,7 @@ import javax.inject.Inject; import javax.inject.Named; import org.jclouds.Constants; +import org.jclouds.blobstore.config.LocalBlobStore; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.domain.BlobMetadata; @@ -89,7 +90,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; * @author Alfredo "Rainbowbreeze" Morresi * @author Andrew Gaul * @author James Murty + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please create and use {@link LocalBlobStore} */ +@Deprecated public class LocalAsyncBlobStore extends BaseAsyncBlobStore { @Resource diff --git a/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseAsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseAsyncBlobStore.java index 3758f7bf10..fdda34191a 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseAsyncBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseAsyncBlobStore.java @@ -52,7 +52,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link org.jclouds.blobstore.BlobStore} */ +@Deprecated public abstract class BaseAsyncBlobStore implements AsyncBlobStore { protected final BlobStoreContext context; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseBlobMap.java b/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseBlobMap.java index 5c77452b0e..cda5ab6810 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseBlobMap.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/internal/BaseBlobMap.java @@ -49,7 +49,9 @@ import com.google.common.collect.ImmutableSet; * * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated public abstract class BaseBlobMap implements ListableMap { protected final BlobStore blobstore; protected final String containerName; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobMapImpl.java b/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobMapImpl.java index 533a62ee56..12c410811b 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobMapImpl.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/internal/BlobMapImpl.java @@ -48,7 +48,9 @@ import com.google.common.collect.ImmutableSet; * @see BaseBlobMap * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated public class BlobMapImpl extends BaseBlobMap implements BlobMap { public static class CorrectBlobName implements Function, Blob> { private final Function prefixer; diff --git a/blobstore/src/main/java/org/jclouds/blobstore/internal/InputStreamMapImpl.java b/blobstore/src/main/java/org/jclouds/blobstore/internal/InputStreamMapImpl.java index 0c5b4152d1..304ff73f8c 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/internal/InputStreamMapImpl.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/internal/InputStreamMapImpl.java @@ -61,7 +61,9 @@ import com.google.common.base.Throwables; * @see BlobStore * @see InputStreamMap * @see BaseBlobMap + * @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore} */ +@Deprecated public class InputStreamMapImpl extends BaseBlobMap implements InputStreamMap { @Inject diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/AWSS3AsyncBlobStore.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/AWSS3AsyncBlobStore.java index 4405b0abe6..c872516936 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/AWSS3AsyncBlobStore.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/AWSS3AsyncBlobStore.java @@ -64,7 +64,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Tibor Kiss, Andrei Savu + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link AWSS3BlobStore} */ +@Deprecated public class AWSS3AsyncBlobStore extends S3AsyncBlobStore { private final Provider multipartUploadStrategy; diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureAsyncBlobStore.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureAsyncBlobStore.java index 43b6fd8a6f..04297fe6c2 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureAsyncBlobStore.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureAsyncBlobStore.java @@ -67,7 +67,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link AzureBlobStore} */ +@Deprecated @Singleton public class AzureAsyncBlobStore extends BaseAsyncBlobStore { private final AzureBlobAsyncClient async; diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/HPCloudObjectStorageAsyncBlobStore.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/HPCloudObjectStorageAsyncBlobStore.java index 4813d5dd32..e8ce0e6630 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/HPCloudObjectStorageAsyncBlobStore.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/HPCloudObjectStorageAsyncBlobStore.java @@ -55,7 +55,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; /** * * @author Adrian Cole + * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer + * supported. Please use {@link HPCloudObjectStorageBlobStore} */ +@Deprecated @Singleton public class HPCloudObjectStorageAsyncBlobStore extends SwiftAsyncBlobStore { private final EnableCDNAndCache enableAndCache;