本文整理了Java中org.jclouds.blobstore.BlobStore.clearContainer()
方法的一些代码示例,展示了BlobStore.clearContainer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlobStore.clearContainer()
方法的具体详情如下:
包路径:org.jclouds.blobstore.BlobStore
类名称:BlobStore
方法名:clearContainer
[英]This will delete the contents of a container at its root path without deleting the container
[中]这将删除容器根路径上的内容,而不删除容器
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public void clear() {
blobstore.clearContainer(containerName, options);
}
代码示例来源:origin: org.apache.camel/camel-jclouds
/**
* Clear a {@link BlobStore} specific container
*/
public static void clearContainer(BlobStore blobStore, String container) throws IOException {
blobStore.clearContainer(container);
}
代码示例来源:origin: org.jclouds/jclouds-blobstore
@Override
public void clear() {
blobstore.clearContainer(containerName, options);
}
代码示例来源:origin: org.apache.jclouds.karaf/commands
@Override
protected Object doExecute() throws Exception {
BlobStore blobStore = getBlobStore();
for (String container : containerNames) {
blobStore.clearContainer(container);
}
return null;
}
}
代码示例来源:origin: com.amysta.jclouds/jclouds-blobstore
@Override
public void clearContainer(String container, ListContainerOptions options) {
delegate().clearContainer(container, options);
}
代码示例来源:origin: Nextdoor/bender
@Override
public void clearContainer(String container, ListContainerOptions options) {
delegate().clearContainer(container, options);
}
代码示例来源:origin: apache/jclouds
/**
* TODO Should throws an exception?
*/
public void testClearContainer_NotExistingContainer() {
blobStore.clearContainer(CONTAINER_NAME);
}
代码示例来源:origin: apache/jclouds
@Override
public void clearContainer(String container, ListContainerOptions options) {
delegate().clearContainer(container, options);
}
代码示例来源:origin: org.apache.jclouds/jclouds-blobstore
@Override
public void clearContainer(String container, ListContainerOptions options) {
delegate().clearContainer(container, options);
}
代码示例来源:origin: org.apache.jclouds/jclouds-blobstore
@Override
public void clearContainer(String container) {
delegate().clearContainer(container);
}
代码示例来源:origin: com.amysta.jclouds/jclouds-blobstore
@Override
public void clearContainer(String container) {
delegate().clearContainer(container);
}
代码示例来源:origin: apache/jclouds
@AfterClass
public void cleanupFiles() {
// Delete local file
delete(bigFile);
delete(new File(bigFile + ".downloaded"));
// Delete uploaded file
blobStore.clearContainer(CONTAINER);
blobStore.deleteContainer(CONTAINER);
}
代码示例来源:origin: jclouds/legacy-jclouds
protected static void createContainerAndEnsureEmpty(BlobStoreContext context, final String containerName)
throws InterruptedException {
context.getBlobStore().createContainerInLocation(null, containerName);
if (context.getConsistencyModel() == ConsistencyModel.EVENTUAL)
Thread.sleep(1000);
context.getBlobStore().clearContainer(containerName);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Test(groups = { "integration", "live" })
public void testClearWhenContentsUnderPath() throws InterruptedException {
String containerName = getContainerName();
try {
add5BlobsUnderPathAnd5UnderRootToContainer(containerName);
view.getBlobStore().clearContainer(containerName);
assertConsistencyAwareContainerSize(containerName, 0);
} finally {
returnContainer(containerName);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public void test() throws IOException {
blobstore.createContainerInLocation(null, "goodies");
for (int i = 0; i < 1001; i++) {
blobstore.putBlob("goodies", blobstore.blobBuilder(i + "").payload(i + "").build());
}
assertEquals(blobstore.countBlobs("goodies"), 1001);
blobstore.clearContainer("goodies");
assertEquals(blobstore.countBlobs("goodies"), 0);
}
代码示例来源:origin: apache/jclouds
public void test() throws IOException {
blobstore.createContainerInLocation(null, "goodies");
for (int i = 0; i < 1001; i++) {
blobstore.putBlob("goodies", blobstore.blobBuilder(i + "").payload(i + "").build());
}
assertEquals(blobstore.countBlobs("goodies"), 1001);
blobstore.clearContainer("goodies");
assertEquals(blobstore.countBlobs("goodies"), 0);
}
代码示例来源:origin: apache/jclouds
@Test(groups = { "integration", "live" })
public void testClearWhenContentsUnderPath() throws InterruptedException {
String containerName = getContainerName();
try {
add5BlobsUnderPathAnd5UnderRootToContainer(containerName);
view.getBlobStore().clearContainer(containerName);
assertConsistencyAwareContainerSize(containerName, 0);
} finally {
returnContainer(containerName);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testStrategies() throws IOException {
blobstore.createContainerInLocation(null, "poo");
for (int i = 0; i < 1001; i++) {
blobstore.putBlob("poo", blobstore.blobBuilder(i + "").payload(i + "").build());
}
ListContainerAndRecurseThroughFolders lister = new ListContainerAndRecurseThroughFolders(
new ConcatenateContainerLists(blobstore));
assertEquals(lister.execute("poo", ListContainerOptions.NONE).size(), 1001);
blobstore.clearContainer("poo");
assertEquals(lister.execute("poo", ListContainerOptions.NONE).size(), 0);
}
代码示例来源:origin: apache/jclouds
public void testStrategies() throws IOException {
blobstore.createContainerInLocation(null, "poo");
for (int i = 0; i < 1001; i++) {
blobstore.putBlob("poo", blobstore.blobBuilder(i + "").payload(i + "").build());
}
ListContainerAndRecurseThroughFolders lister = new ListContainerAndRecurseThroughFolders(
new ConcatenateContainerLists(blobstore));
assertEquals(lister.execute("poo", ListContainerOptions.NONE).size(), 1001);
blobstore.clearContainer("poo");
assertEquals(lister.execute("poo", ListContainerOptions.NONE).size(), 0);
}
代码示例来源:origin: apache/jclouds
protected void createContainerAndEnsureEmpty(BlobStoreContext context, final String containerName,
boolean ensureConsistent) throws InterruptedException {
context.getBlobStore().createContainerInLocation(null, containerName);
if (ensureConsistent) {
awaitConsistency();
}
context.getBlobStore().clearContainer(containerName);
}
内容来源于网络,如有侵权,请联系作者删除!