Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.BlobStore.list()




    public Set<? extends StorageMetadata> getS3Buckets() throws InvalidCredentialsException {
        BlobStore store = getBlobStoreContext().getBlobStore();
        return store.list();
    }

    /**
     * Returns a list of JSONObjects representing the storage blobs available to this AWS connection.
     *
 
View Full Code Here


              .scope(LocationScope.REGION)
              .description("Superfluous description to appease jclouds.");

            store.createContainerInLocation(lb.build(), bucketName);

            for (StorageMetadata sm : store.list()) {
                if (sm.getName().equals(bucketName)) {
                    bucket = sm;
                    break;
                }
            }
View Full Code Here

      // Create and use a valid bucket name with uppercase characters in the bucket name (US regions only)
      try {
         store.createContainerInLocation(null, bucketName);

         for (StorageMetadata metadata : store.list()) {
            if (metadata.getName().equals(bucketName)) {
               container = metadata;
               break;
            }
         }
View Full Code Here

      // Create and use a valid bucket name with uppercase characters in the bucket name (US regions only)
      try {
         store.createContainerInLocation(null, bucketName);

         for (StorageMetadata metadata : store.list()) {
            if (metadata.getName().equals(bucketName)) {
               container = metadata;
               break;
            }
         }
View Full Code Here

                }})
                .buildView(BlobStoreContext.class);
       
        BlobStore store = ctx.getBlobStore();
        ListContainerOptions options = new ListContainerOptions().maxResults(batchSize).afterMarker(lastMarker);
        PageSet<? extends StorageMetadata> pages = store.list(container, options);
       
        log.debug("Saw {} new files since {}", pages.size() == batchSize ? "many" : Integer.toString(pages.size()), lastMarker);
        boolean emptiness = getBlobsWithinRange(pages).isEmpty();

        if(emptiness) {
View Full Code Here

                .buildView(BlobStoreContext.class);

        // threadsafe according to https://jclouds.apache.org/documentation/userguide/blobstore-guide/
        BlobStore store = ctx.getBlobStore();
        ListContainerOptions options = new ListContainerOptions().maxResults(batchSize).afterMarker(lastMarker);
        PageSet<? extends StorageMetadata> pages = store.list(container, options);

        //Gets key within the time range specified
        NavigableMap<Long, String> mapWithinRange = getBlobsWithinRange(pages);

        //Download only for keys within that range
View Full Code Here

      if (directoryPath != null) {
         options = options.inDirectory(directoryPath);
      }

      while (true) {
         PageSet<? extends StorageMetadata> blobStoreMetadatas = blobStore.list(containerName, options);
         List<String> blobNames = Lists.newArrayList();

         for (StorageMetadata blobMetadata : blobStoreMetadatas) {
            String blobName = blobMetadata.getName();
            // do not add to cacheProvider since long lists will cause OutOfMemoryError
View Full Code Here

   @Override
   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();

      PageSet<? extends StorageMetadata> allContainerMetadata = blobStore.list();
      for (String containerName : containerNames) {
         boolean found = false;
         for (StorageMetadata containerMetadata : allContainerMetadata) {
            if (containerName.equals(containerMetadata.getName())) {
               printContainerMetadata(containerMetadata);
View Full Code Here

   @Override
   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();
      List<String> containerNames = Lists.newArrayList();

      for (StorageMetadata containerMetadata : blobStore.list()) {
         containerNames.add(containerMetadata.getName());
      }

      Collections.sort(containerNames);
      for (String containerName : containerNames) {
View Full Code Here

   @Test
   public void trySign() throws InterruptedException, ExecutionException {
      RegionScopedBlobStoreContext ctx = RegionScopedBlobStoreContext.class.cast(view);
      for (String regionId : ctx.configuredRegions()) {
         BlobStore region = ctx.blobStoreInRegion(regionId);
         PageSet<? extends StorageMetadata> containers = region.list();
         if (containers.isEmpty()) {
            continue;
         }
         String containerName = Iterables.getLast(containers).getName();
         PageSet<? extends StorageMetadata> blobs = region.list(containerName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.