org.jclouds.blobstore.BlobStore.countBlobs()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(172)

本文整理了Java中org.jclouds.blobstore.BlobStore.countBlobs()方法的一些代码示例,展示了BlobStore.countBlobs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlobStore.countBlobs()方法的具体详情如下:
包路径:org.jclouds.blobstore.BlobStore
类名称:BlobStore
方法名:countBlobs

BlobStore.countBlobs介绍

暂无

代码示例

代码示例来源:origin: apache/usergrid

Long numOfFiles = blobStore.countBlobs(bucketName);
Long numWeWant = 1L;
blobStore.deleteContainer(bucketName);

代码示例来源:origin: apache/usergrid

assert ( false );
Long numOfFiles = blobStore.countBlobs( bucketName );
Long numWeWant = Long.valueOf( 1 );
assertEquals( numOfFiles, numWeWant );

代码示例来源:origin: apache/usergrid

Long numOfFiles = blobStore.countBlobs( bucketName );

代码示例来源:origin: org.jclouds/jclouds-blobstore

@Override
public int size() {
 return (int) blobstore.countBlobs(containerName, options);
}

代码示例来源:origin: org.apache.camel/camel-jclouds

/**
 * Return the count of all the blobs in the container
 */
public static long countBlob(BlobStore blobStore, String container) {
  long blobsCount = blobStore.countBlobs(container);
  return blobsCount;
}

代码示例来源:origin: jclouds/legacy-jclouds

@Override
public int size() {
 return (int) blobstore.countBlobs(containerName, options);
}

代码示例来源:origin: apache/jclouds

@Override
public long countBlobs(String container) {
 return delegate().countBlobs(container);
}

代码示例来源:origin: apache/jclouds

@Override
public long countBlobs(String container, ListContainerOptions options) {
 return delegate().countBlobs(container, options);
}

代码示例来源:origin: org.apache.jclouds/jclouds-blobstore

@Override
public long countBlobs(String container) {
 return delegate().countBlobs(container);
}

代码示例来源:origin: jclouds/legacy-jclouds

public void run() {
   try {
     assertEquals(view.getBlobStore().countBlobs(containerName), size);
   } catch (Exception e) {
     propagateIfPossible(e);
   }
  }
});

代码示例来源:origin: jclouds/legacy-jclouds

public void testExecuteNonRecursive() {
 deleter.execute(containerName, ListContainerOptions.NONE);
 assertEquals(blobstore.countBlobs(containerName), 2222);
}

代码示例来源:origin: apache/jclouds

public void testExecuteWithoutOptionsClearsRecursively() {
 deleter.execute(containerName);
 assertEquals(blobstore.countBlobs(containerName), 0);
}

代码示例来源:origin: apache/jclouds

public void testCountBlobs_NoOptionsEmptyContainer() {
  blobStore.createContainerInLocation(null, CONTAINER_NAME);
  blobStore.countBlobs(PROVIDER);
}

代码示例来源:origin: apache/jclouds

public void run() {
   try {
     assertEquals(view.getBlobStore().countBlobs(containerName), size);
   } catch (Exception e) {
     propagateIfPossible(e);
   }
  }
});

代码示例来源:origin: jclouds/legacy-jclouds

public void testExecuteWithoutOptionsClearsRecursively() {
 deleter.execute(containerName);
 assertEquals(blobstore.countBlobs(containerName), 0);
}

代码示例来源:origin: jclouds/legacy-jclouds

public void testExecuteInDirectory() {
 deleter.execute(containerName, ListContainerOptions.Builder.inDirectory(directoryName));
 assertEquals(blobstore.countBlobs(containerName), 1111);
}

代码示例来源:origin: jclouds/legacy-jclouds

public void testExecuteRecursive() {
 deleter.execute(containerName, ListContainerOptions.Builder.recursive());
 assertEquals(blobstore.countBlobs(containerName), 0);
}

代码示例来源: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: jclouds/legacy-jclouds

@Test(groups = { "integration", "live" })
public void testPutTwiceIsOkAndDoesntOverwrite() throws InterruptedException {
 String containerName = getContainerName();
 try {
   view.getBlobStore().createContainerInLocation(null, containerName);
   Blob blob = view.getBlobStore().blobBuilder("hello").payload(TEST_STRING).build();
   view.getBlobStore().putBlob(containerName, blob);
   view.getBlobStore().createContainerInLocation(null, containerName);
   assertEquals(view.getBlobStore().countBlobs(containerName), 1);
 } finally {
   returnContainer(containerName);
 }
}

相关文章