org.jclouds.blobstore.internal
Class BlobStoreContextImpl

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by org.jclouds.internal.BaseView
          extended by org.jclouds.blobstore.internal.BlobStoreContextImpl
All Implemented Interfaces:
Closeable, BlobStoreContext, org.jclouds.View

@Singleton
public class BlobStoreContextImpl
extends org.jclouds.internal.BaseView
implements BlobStoreContext

Author:
Adrian Cole

Constructor Summary
BlobStoreContextImpl(org.jclouds.Context backend, com.google.common.reflect.TypeToken<? extends org.jclouds.Context> backendType, BlobMap.Factory blobMapFactory, org.jclouds.rest.Utils utils, ConsistencyModel consistencyModel, InputStreamMap.Factory inputStreamMapFactory, AsyncBlobStore ablobStore, BlobStore blobStore, BlobRequestSigner blobRequestSigner)
           
 
Method Summary
 void close()
          closes threads and resources related to this connection.
 BlobMap createBlobMap(String container)
          Creates a Map view of the specified container.
 BlobMap createBlobMap(String container, ListContainerOptions options)
          Creates a Map view of the specified container.
 InputStreamMap createInputStreamMap(String container)
          Creates a Map view of the specified container.
 InputStreamMap createInputStreamMap(String container, ListContainerOptions options)
          Creates a Map view of the specified container.
 boolean equals(Object obj)
           
 AsyncBlobStore getAsyncBlobStore()
           
 BlobStore getBlobStore()
           
 ConsistencyModel getConsistencyModel()
           
<S,A> org.jclouds.rest.RestContext<S,A>
getProviderSpecificContext()
          will be removed in jclouds 1.6
 BlobRequestSigner getSigner()
          Generates signed requests for blobs.
 org.jclouds.rest.Utils getUtils()
           
 int hashCode()
           
 String toString()
           
 org.jclouds.rest.Utils utils()
           
 
Methods inherited from class org.jclouds.internal.BaseView
delegate, getBackendType, string, unwrap, unwrap, unwrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.View
getBackendType, unwrap, unwrap, unwrap
 

Constructor Detail

BlobStoreContextImpl

@Inject
public BlobStoreContextImpl(org.jclouds.Context backend,
                                   com.google.common.reflect.TypeToken<? extends org.jclouds.Context> backendType,
                                   BlobMap.Factory blobMapFactory,
                                   org.jclouds.rest.Utils utils,
                                   ConsistencyModel consistencyModel,
                                   InputStreamMap.Factory inputStreamMapFactory,
                                   AsyncBlobStore ablobStore,
                                   BlobStore blobStore,
                                   BlobRequestSigner blobRequestSigner)
Method Detail

getConsistencyModel

public ConsistencyModel getConsistencyModel()
Specified by:
getConsistencyModel in interface BlobStoreContext
Returns:
best guess at the consistency model used in this BlobStore.

createBlobMap

public BlobMap createBlobMap(String container,
                             ListContainerOptions options)
Description copied from interface: BlobStoreContext
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.

Specified by:
createBlobMap in interface BlobStoreContext
Parameters:
container - existing container you wish to read or modify
options - allow you to specify a directory within the container, or whether to list recursively.

createBlobMap

public BlobMap createBlobMap(String container)
Description copied from interface: BlobStoreContext
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.

Specified by:
createBlobMap in interface BlobStoreContext
Parameters:
container - existing container you wish to read or modify

createInputStreamMap

public InputStreamMap createInputStreamMap(String container,
                                           ListContainerOptions options)
Description copied from interface: BlobStoreContext
Creates a Map view of the specified container. Use this for simplest access to blobstore, knowing that MD5s will be calculated for every object.

Specified by:
createInputStreamMap in interface BlobStoreContext
Parameters:
container - existing container you wish to read or modify
options - allow you to specify a directory within the container, or whether to list recursively.

createInputStreamMap

public InputStreamMap createInputStreamMap(String container)
Description copied from interface: BlobStoreContext
Creates a Map view of the specified container. Use this for simplest access to blobstore, knowing that MD5s will be calculated for every object. Only root-level blobs will be visible.

Specified by:
createInputStreamMap in interface BlobStoreContext
Parameters:
container - existing container you wish to read or modify

getBlobStore

public BlobStore getBlobStore()
Specified by:
getBlobStore in interface BlobStoreContext
Returns:
a portable interface for the BlobStore.

getAsyncBlobStore

public AsyncBlobStore getAsyncBlobStore()
Specified by:
getAsyncBlobStore in interface BlobStoreContext
Returns:
a portable asynchronous interface for the BlobStore, which returns Futures for each call.

getUtils

public org.jclouds.rest.Utils getUtils()
Specified by:
getUtils in interface BlobStoreContext

utils

public org.jclouds.rest.Utils utils()
Specified by:
utils in interface BlobStoreContext
See Also:
BlobStoreContext.getUtils()

getSigner

public BlobRequestSigner getSigner()
Description copied from interface: BlobStoreContext
Generates signed requests for blobs. useful in other tools such as backup utilities.

Specified by:
getSigner in interface BlobStoreContext

getProviderSpecificContext

public <S,A> org.jclouds.rest.RestContext<S,A> getProviderSpecificContext()
Description copied from interface: BlobStoreContext
will be removed in jclouds 1.6

Specified by:
getProviderSpecificContext in interface BlobStoreContext
See Also:
View#getInputType, View.unwrap(com.google.common.reflect.TypeToken)

close

public void close()
Description copied from interface: BlobStoreContext
closes threads and resources related to this connection.

Specified by:
close in interface Closeable
Specified by:
close in interface BlobStoreContext

hashCode

public int hashCode()
Overrides:
hashCode in class org.jclouds.internal.BaseView

toString

public String toString()
Overrides:
toString in class org.jclouds.internal.BaseView

equals

public boolean equals(Object obj)
Overrides:
equals in class org.jclouds.internal.BaseView


Copyright © 2009-2012 jclouds. All Rights Reserved.