mirror of https://github.com/apache/jclouds.git
Merge pull request #743 from andrewgaul/transient-strategy-override
Add missing @Override in TransientStorageStrategy
This commit is contained in:
commit
9eaf7acd5c
|
@ -77,14 +77,17 @@ public class TransientStorageStrategy implements LocalStorageStrategy {
|
||||||
this.uriBuilders = uriBuilders;
|
this.uriBuilders = uriBuilders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterable<String> getAllContainerNames() {
|
public Iterable<String> getAllContainerNames() {
|
||||||
return containerToBlobs.keySet();
|
return containerToBlobs.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean containerExists(final String containerName) {
|
public boolean containerExists(final String containerName) {
|
||||||
return containerToBlobs.containsKey(containerName);
|
return containerToBlobs.containsKey(containerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clearContainer(final String containerName) {
|
public void clearContainer(final String containerName) {
|
||||||
containerToBlobs.get(containerName).clear();
|
containerToBlobs.get(containerName).clear();
|
||||||
}
|
}
|
||||||
|
@ -95,6 +98,7 @@ public class TransientStorageStrategy implements LocalStorageStrategy {
|
||||||
clearContainer(container);
|
clearContainer(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean createContainerInLocation(final String containerName, final Location location) {
|
public boolean createContainerInLocation(final String containerName, final Location location) {
|
||||||
ConcurrentMap<String, Blob> origValue = containerToBlobs.putIfAbsent(
|
ConcurrentMap<String, Blob> origValue = containerToBlobs.putIfAbsent(
|
||||||
containerName, new ConcurrentHashMap<String, Blob>());
|
containerName, new ConcurrentHashMap<String, Blob>());
|
||||||
|
@ -105,20 +109,24 @@ public class TransientStorageStrategy implements LocalStorageStrategy {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteContainer(final String containerName) {
|
public void deleteContainer(final String containerName) {
|
||||||
containerToBlobs.remove(containerName);
|
containerToBlobs.remove(containerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean blobExists(final String containerName, final String blobName) {
|
public boolean blobExists(final String containerName, final String blobName) {
|
||||||
Map<String, Blob> map = containerToBlobs.get(containerName);
|
Map<String, Blob> map = containerToBlobs.get(containerName);
|
||||||
return map != null && map.containsKey(blobName);
|
return map != null && map.containsKey(blobName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Blob getBlob(final String containerName, final String blobName) {
|
public Blob getBlob(final String containerName, final String blobName) {
|
||||||
Map<String, Blob> map = containerToBlobs.get(containerName);
|
Map<String, Blob> map = containerToBlobs.get(containerName);
|
||||||
return map == null ? null : map.get(blobName);
|
return map == null ? null : map.get(blobName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String putBlob(final String containerName, final Blob blob) throws IOException {
|
public String putBlob(final String containerName, final Blob blob) throws IOException {
|
||||||
Blob newBlob = createUpdatedCopyOfBlobInContainer(containerName, blob);
|
Blob newBlob = createUpdatedCopyOfBlobInContainer(containerName, blob);
|
||||||
Map<String, Blob> map = containerToBlobs.get(containerName);
|
Map<String, Blob> map = containerToBlobs.get(containerName);
|
||||||
|
@ -128,12 +136,14 @@ public class TransientStorageStrategy implements LocalStorageStrategy {
|
||||||
return eTag;
|
return eTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeBlob(final String containerName, final String blobName) {
|
public void removeBlob(final String containerName, final String blobName) {
|
||||||
Map<String, Blob> map = containerToBlobs.get(containerName);
|
Map<String, Blob> map = containerToBlobs.get(containerName);
|
||||||
if (map != null)
|
if (map != null)
|
||||||
map.remove(blobName);
|
map.remove(blobName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterable<String> getBlobKeysInsideContainer(final String containerName) {
|
public Iterable<String> getBlobKeysInsideContainer(final String containerName) {
|
||||||
return containerToBlobs.get(containerName).keySet();
|
return containerToBlobs.get(containerName).keySet();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue