Package org.jclouds.blobstore

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


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

      for (String container : containerNames) {
          if (!blobStore.containerExists(container)) {
             throw new ContainerNotFoundException(container, "while checking existence");
          }
      }
      return null;
   }
View Full Code Here


      }

      for (String container : containerNames) {
         boolean created = blobStore.createContainerInLocation(location, container);
         if (!created) {
            if (blobStore.containerExists(container)) {
               throw new Exception("Container already exists: " + container);
            }

            throw new Exception("Could not create container: " + container);
         }
View Full Code Here

                    }
                }
                if (blobStore == null) {
                    throw new IOException("BlobStore service not available for provider " + providerOrApi);
                }
                if (!blobStore.containerExists(containerName)) {
                    throw new IOException("Container " + containerName + " does not exists");
                } else if (!blobStore.blobExists(containerName, blobName)) {
                    throw new IOException("Blob " + blobName + " does not exists");
                }
View Full Code Here

        @Override
        public OutputStream getOutputStream() throws IOException {
            try {
                final BlobStore blobStore = ServiceHelper.getService(id, providerOrApi, blobStores);
                if (!blobStore.containerExists(containerName)) {
                    blobStore.createContainerInLocation(null, containerName);
                }

                final CountDownLatch readLatch = new CountDownLatch(1);
                final File tmpDir = Files.createTempDir();
View Full Code Here

        storeContext = ContextBuilder.newBuilder( provider ).
            credentials( identifier, credentials ).
            overrides( asProperties( properties ) ).
            buildView( BlobStoreContext.class );
        BlobStore blobStore = storeContext.getBlobStore();
        if( !blobStore.containerExists( container ) )
        {
            if( !blobStore.createContainerInLocation( null, container ) )
            {
                throw new EntityStoreException( "Unable to create JClouds Blob Container, cannot continue." );
            }
View Full Code Here

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

      for (String container : containerNames) {
          if (!blobStore.containerExists(container)) {
             throw new ContainerNotFoundException(container, "while checking existence");
          }
      }
      return null;
   }
View Full Code Here

      }

      for (String container : containerNames) {
         boolean created = blobStore.createContainerInLocation(location, container);
         if (!created) {
            if (blobStore.containerExists(container)) {
               throw new Exception("Container already exists: " + container);
            }

            throw new Exception("Could not create container: " + container);
         }
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.