Merge pull request #1512 from jclouds/deprecate-weird-blobstore-stuff

deprecated blobstore interfaces that imply complex internal code
This commit is contained in:
Andrew Gaul 2013-04-09 16:48:26 -07:00
commit b4819b6c17
17 changed files with 63 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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

View File

@ -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<String, Blob> {

View File

@ -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 <code>Map<String,Blob></code> 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 <code>Map<String,Blob></code> 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();

View File

@ -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<String, InputStream> {
public static interface Factory {

View File

@ -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<K, V> extends Map<K, V> {
/**

View File

@ -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

View File

@ -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;

View File

@ -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<V> implements ListableMap<String, V> {
protected final BlobStore blobstore;
protected final String containerName;

View File

@ -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<Blob> implements BlobMap {
public static class CorrectBlobName implements Function<java.util.Map.Entry<? extends String, ? extends Blob>, Blob> {
private final Function<String, String> prefixer;

View File

@ -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<InputStream> implements InputStreamMap {
@Inject

View File

@ -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<AsyncMultipartUploadStrategy> multipartUploadStrategy;

View File

@ -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;

View File

@ -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;