org.jclouds.blobstore.internal
Class BaseBlobMap<V>

java.lang.Object
  extended by org.jclouds.blobstore.internal.BaseBlobMap<V>
All Implemented Interfaces:
Map<String,V>, ListableMap<String,V>
Direct Known Subclasses:
BlobMapImpl, InputStreamMapImpl

public abstract class BaseBlobMap<V>
extends Object
implements ListableMap<String,V>

Implements core Map functionality with a BlobStore

Author:
Adrian Cole

Nested Class Summary
 class BaseBlobMap.Entry
           
 
Field Summary
protected  BlobStore blobstore
           
protected  String containerName
           
protected  ContainsValueInListStrategy containsValueStrategy
           
protected  GetBlobsInListStrategy getAllBlobs
           
protected  ListContainerAndRecurseThroughFolders listStrategy
           
protected  ListContainerOptions options
           
protected  com.google.common.base.Function<String,String> pathStripper
           
protected  com.google.common.base.Function<String,String> prefixer
           
protected  PutBlobsStrategy putBlobsStrategy
           
 
Constructor Summary
BaseBlobMap(BlobStore blobstore, GetBlobsInListStrategy getAllBlobs, ContainsValueInListStrategy containsValueStrategy, PutBlobsStrategy putBlobsStrategy, ListContainerAndRecurseThroughFolders listStrategy, String containerName, ListContainerOptions options)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<String,V>> entrySet()
           
protected  Iterable<Blob> getAllBlobs()
           
 boolean isEmpty()
           
 Set<String> keySet()
           
 Iterable<? extends BlobMetadata> list()
           
 int size()
           
protected  Blob stripPrefix(Blob from)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, get, hashCode, put, putAll, remove, values
 

Field Detail

blobstore

protected final BlobStore blobstore

containerName

protected final String containerName

prefixer

protected final com.google.common.base.Function<String,String> prefixer

pathStripper

protected final com.google.common.base.Function<String,String> pathStripper

options

protected final ListContainerOptions options

getAllBlobs

protected final GetBlobsInListStrategy getAllBlobs

containsValueStrategy

protected final ContainsValueInListStrategy containsValueStrategy

listStrategy

protected final ListContainerAndRecurseThroughFolders listStrategy

putBlobsStrategy

protected final PutBlobsStrategy putBlobsStrategy
Constructor Detail

BaseBlobMap

@Inject
public BaseBlobMap(BlobStore blobstore,
                          GetBlobsInListStrategy getAllBlobs,
                          ContainsValueInListStrategy containsValueStrategy,
                          PutBlobsStrategy putBlobsStrategy,
                          ListContainerAndRecurseThroughFolders listStrategy,
                          String containerName,
                          ListContainerOptions options)
Method Detail

entrySet

public Set<Map.Entry<String,V>> entrySet()
Specified by:
entrySet in interface Map<String,V>

size

public int size()
Specified by:
size in interface Map<String,V>

getAllBlobs

protected Iterable<Blob> getAllBlobs()

stripPrefix

protected Blob stripPrefix(Blob from)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,V>

clear

public void clear()
Specified by:
clear in interface Map<String,V>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,V>

list

public Iterable<? extends BlobMetadata> list()
Specified by:
list in interface ListableMap<String,V>
Returns:
blob listing that this map represents

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.