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 * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link AtmosBlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
private final AtmosAsyncClient async; private final AtmosAsyncClient async;

View File

@ -55,7 +55,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link CloudFilesBlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class CloudFilesAsyncBlobStore extends SwiftAsyncBlobStore { public class CloudFilesAsyncBlobStore extends SwiftAsyncBlobStore {
private final EnableCDNAndCache enableCDNAndCache; private final EnableCDNAndCache enableCDNAndCache;

View File

@ -73,7 +73,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link S3BlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class S3AsyncBlobStore extends BaseAsyncBlobStore { public class S3AsyncBlobStore extends BaseAsyncBlobStore {

View File

@ -69,7 +69,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link SwiftBlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class SwiftAsyncBlobStore extends BaseAsyncBlobStore { public class SwiftAsyncBlobStore extends BaseAsyncBlobStore {
private final CommonSwiftClient sync; 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 * 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 { public interface AsyncBlobStore {
/** /**
* @see BlobStore#getContext * @see BlobStore#getContext

View File

@ -31,7 +31,9 @@ import com.google.inject.ImplementedBy;
* *
* @author Adrian Cole * @author Adrian Cole
* *
* @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore}
*/ */
@Deprecated
@ImplementedBy(BlobMapImpl.class) @ImplementedBy(BlobMapImpl.class)
public interface BlobMap extends ListableMap<String, Blob> { public interface BlobMap extends ListableMap<String, Blob> {

View File

@ -53,7 +53,9 @@ public interface BlobStoreContext extends Closeable, View {
* @param options * @param options
* allow you to specify a directory within the container, or whether to list * allow you to specify a directory within the container, or whether to list
* recursively. * recursively.
* @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore}
*/ */
@Deprecated
InputStreamMap createInputStreamMap(String container, ListContainerOptions options); InputStreamMap createInputStreamMap(String container, ListContainerOptions options);
/** /**
@ -64,7 +66,9 @@ public interface BlobStoreContext extends Closeable, View {
* *
* @param container * @param container
* existing container you wish to read or modify * 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); InputStreamMap createInputStreamMap(String container);
/** /**
@ -76,24 +80,33 @@ public interface BlobStoreContext extends Closeable, View {
* @param options * @param options
* allow you to specify a directory within the container, or whether to list * allow you to specify a directory within the container, or whether to list
* recursively. * recursively.
* @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore}
*/ */
@Deprecated
BlobMap createBlobMap(String container, ListContainerOptions options); BlobMap createBlobMap(String container, ListContainerOptions options);
/** /**
* Creates a <code>Map<String,Blob></code> view of the specified container. Use this when you wan * Creates a <code>Map<String,Blob></code> view of the specified container.
* to control the content type, or manually specify length or size of blobs. * 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. * Only root-level blobs will be visible.
* *
* @param container * @param container
* existing container you wish to read or modify * 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); BlobMap createBlobMap(String container);
/** /**
* @return a portable asynchronous interface for the BlobStore, which returns {@code Future}s for * @return a portable asynchronous interface for the BlobStore, which returns
* each call. * {@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(); AsyncBlobStore getAsyncBlobStore();
/** /**
@ -104,7 +117,9 @@ public interface BlobStoreContext extends Closeable, View {
/** /**
* *
* @return best guess at the consistency model used in this BlobStore. * @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(); ConsistencyModel getConsistencyModel();

View File

@ -38,7 +38,9 @@ import com.google.inject.ImplementedBy;
* {@link #putFile(String, File)} or {@link S3ObjectMap} instead. * {@link #putFile(String, File)} or {@link S3ObjectMap} instead.
* *
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore}
*/ */
@Deprecated
@ImplementedBy(InputStreamMapImpl.class) @ImplementedBy(InputStreamMapImpl.class)
public interface InputStreamMap extends ListableMap<String, InputStream> { public interface InputStreamMap extends ListableMap<String, InputStream> {
public static interface Factory { public static interface Factory {

View File

@ -27,7 +27,9 @@ import org.jclouds.blobstore.domain.StorageMetadata;
* *
* @author Adrian Cole * @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> { public interface ListableMap<K, V> extends Map<K, V> {
/** /**

View File

@ -42,6 +42,7 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.blobstore.config.LocalBlobStore;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.domain.Blob.Factory;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
@ -89,7 +90,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
* @author Alfredo "Rainbowbreeze" Morresi * @author Alfredo "Rainbowbreeze" Morresi
* @author Andrew Gaul * @author Andrew Gaul
* @author James Murty * @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 { public class LocalAsyncBlobStore extends BaseAsyncBlobStore {
@Resource @Resource

View File

@ -52,7 +52,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Adrian Cole * @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 { public abstract class BaseAsyncBlobStore implements AsyncBlobStore {
protected final BlobStoreContext context; protected final BlobStoreContext context;

View File

@ -49,7 +49,9 @@ import com.google.common.collect.ImmutableSet;
* *
* *
* @author Adrian Cole * @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> { public abstract class BaseBlobMap<V> implements ListableMap<String, V> {
protected final BlobStore blobstore; protected final BlobStore blobstore;
protected final String containerName; protected final String containerName;

View File

@ -48,7 +48,9 @@ import com.google.common.collect.ImmutableSet;
* @see BaseBlobMap * @see BaseBlobMap
* *
* @author Adrian Cole * @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 class BlobMapImpl extends BaseBlobMap<Blob> implements BlobMap {
public static class CorrectBlobName implements Function<java.util.Map.Entry<? extends String, ? extends Blob>, Blob> { public static class CorrectBlobName implements Function<java.util.Map.Entry<? extends String, ? extends Blob>, Blob> {
private final Function<String, String> prefixer; private final Function<String, String> prefixer;

View File

@ -61,7 +61,9 @@ import com.google.common.base.Throwables;
* @see BlobStore * @see BlobStore
* @see InputStreamMap * @see InputStreamMap
* @see BaseBlobMap * @see BaseBlobMap
* @deprecated will be removed in jclouds 1.7. Please use {@link BlobStore}
*/ */
@Deprecated
public class InputStreamMapImpl extends BaseBlobMap<InputStream> implements InputStreamMap { public class InputStreamMapImpl extends BaseBlobMap<InputStream> implements InputStreamMap {
@Inject @Inject

View File

@ -64,7 +64,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Tibor Kiss, Andrei Savu * @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 { public class AWSS3AsyncBlobStore extends S3AsyncBlobStore {
private final Provider<AsyncMultipartUploadStrategy> multipartUploadStrategy; private final Provider<AsyncMultipartUploadStrategy> multipartUploadStrategy;

View File

@ -67,7 +67,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link AzureBlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class AzureAsyncBlobStore extends BaseAsyncBlobStore { public class AzureAsyncBlobStore extends BaseAsyncBlobStore {
private final AzureBlobAsyncClient async; private final AzureBlobAsyncClient async;

View File

@ -55,7 +55,10 @@ import com.google.common.util.concurrent.ListeningExecutorService;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
* supported. Please use {@link HPCloudObjectStorageBlobStore}
*/ */
@Deprecated
@Singleton @Singleton
public class HPCloudObjectStorageAsyncBlobStore extends SwiftAsyncBlobStore { public class HPCloudObjectStorageAsyncBlobStore extends SwiftAsyncBlobStore {
private final EnableCDNAndCache enableAndCache; private final EnableCDNAndCache enableAndCache;