mirror of https://github.com/apache/jclouds.git
newBlob -> blobBuilder...build()
This commit is contained in:
parent
8e2ea83bc1
commit
e4216ea1ea
|
@ -62,7 +62,7 @@ public class StoreTweetsController extends HttpServlet {
|
|||
}
|
||||
|
||||
public Blob apply(Status from) {
|
||||
Blob to = map.newBlob(from.getId() + "");
|
||||
Blob to = map.blobBuilder().name(from.getId() + "").build();
|
||||
to.setPayload(from.getText());
|
||||
to.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
|
||||
to.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, from.getUser().getScreenName());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class AddTweetsControllerTest {
|
|||
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
|
||||
"dummy", "dummy");
|
||||
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
|
||||
Blob blob = context.getAsyncBlobStore().newBlob("1");
|
||||
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
context.getAsyncBlobStore().putBlob(container, blob).get();
|
||||
|
|
|
@ -48,7 +48,7 @@ public class KeyToStoredTweetStatusTest {
|
|||
|
||||
public void testStoreTweets() throws IOException, InterruptedException, ExecutionException {
|
||||
BlobMap map = createMap();
|
||||
Blob blob = map.newBlob("1");
|
||||
Blob blob = map.blobBuilder().name("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
map.put("1", blob);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ServiceToStoredTweetStatusesTest {
|
|||
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
|
||||
"dummy", "dummy");
|
||||
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
|
||||
Blob blob = context.getAsyncBlobStore().newBlob("1");
|
||||
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
context.getAsyncBlobStore().putBlob(container, blob).get();
|
||||
|
|
|
@ -62,7 +62,7 @@ public class StoreTweetsController extends HttpServlet {
|
|||
}
|
||||
|
||||
public Blob apply(Status from) {
|
||||
Blob to = map.newBlob(from.getId() + "");
|
||||
Blob to = map.blobBuilder().name(from.getId() + "").build();
|
||||
to.setPayload(from.getText());
|
||||
to.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
|
||||
to.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, from.getUser().getScreenName());
|
||||
|
|
|
@ -51,7 +51,7 @@ public class AddTweetsControllerTest {
|
|||
for (String name : new String[] { "1", "2" }) {
|
||||
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient", "dummy", "dummy");
|
||||
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
|
||||
Blob blob = context.getAsyncBlobStore().newBlob("1");
|
||||
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
context.getAsyncBlobStore().putBlob(container, blob).get();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class KeyToStoredTweetStatusTest {
|
|||
|
||||
public void testStoreTweets() throws IOException, InterruptedException, ExecutionException {
|
||||
BlobMap map = createMap();
|
||||
Blob blob = map.newBlob("1");
|
||||
Blob blob = map.blobBuilder().name("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
map.put("1", blob);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ServiceToStoredTweetStatusesTest {
|
|||
BlobStoreContext context = new BlobStoreContextFactory().createContext("transient",
|
||||
"dummy", "dummy");
|
||||
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
|
||||
Blob blob = context.getAsyncBlobStore().newBlob("1");
|
||||
Blob blob = context.getAsyncBlobStore().blobBuilder("1").build();
|
||||
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");
|
||||
blob.setPayload("I love beans!");
|
||||
context.getAsyncBlobStore().putBlob(container, blob).get();
|
||||
|
|
Loading…
Reference in New Issue