Examples of blobExists()


Examples of org.elasticsearch.common.blobstore.BlobContainer.blobExists()

    @Override
    public void verify(String seed) {
        BlobContainer testBlobContainer = blobStore.blobContainer(basePath);;
        DiscoveryNode localNode = clusterService.localNode();
        if (testBlobContainer.blobExists(testBlobPrefix(seed) + "-master")) {
            try (OutputStream outputStream = testBlobContainer.createOutput(testBlobPrefix(seed) + "-" + localNode.getId())) {
                outputStream.write(Strings.toUTF8Bytes(seed));
            } catch (IOException exp) {
                throw new RepositoryVerificationException(repositoryName, "store location [" + blobStore + "] is not accessible on the node [" + localNode + "]", exp);
            }
View Full Code Here

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

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

      if (!blobStore.blobExists(containerName, blobName)) {
          throw new KeyNotFoundException(containerName, blobName, "while checking existence");
      }
      return null;
   }
}
View Full Code Here

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

                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");
                }

                Blob blob = blobStore.getBlob(containerName, blobName);
View Full Code Here

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

  public synchronized void putIfAbsent(File file) throws FileNotFoundException {
      allocateContainer();

      BlobStore store = context.getBlobStore();
      if (!store.blobExists(container, file.getName())) {
        LOG.info("Uploading '{}' to '{}' blob cache.", file.getName(), container);

        Blob blob = context.getBlobStore().blobBuilder(container)
                .name(file.getName())
                .payload(file)
View Full Code Here

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

  public synchronized void putIfAbsent(String name, InputStream in, long contentLength) {
    allocateContainer();

    BlobStore store = context.getBlobStore();
    if (!store.blobExists(container, name)) {
      LOG.info("Uploading '{}' to '{}' blob cache.", name, container);

      Blob blob = context.getBlobStore().newBlob(name);
      blob.setPayload(in);
      blob.getMetadata().getContentMetadata().setContentLength(contentLength);
View Full Code Here

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

  public synchronized void putIfAbsent(File file) throws FileNotFoundException {
      allocateContainer();

      BlobStore store = context.getBlobStore();
      if (!store.blobExists(container, file.getName())) {
        LOG.info("Uploading '{}' to '{}' blob cache.", file.getName(), container);

        Blob blob = context.getBlobStore().blobBuilder(container)
                .name(file.getName())
                .payload(file)
View Full Code Here

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

  public synchronized void putIfAbsent(File file) throws FileNotFoundException {
      allocateContainer();

      BlobStore store = context.getBlobStore();
      if (!store.blobExists(container, file.getName())) {
        LOG.info("Uploading '{}' to '{}' blob cache.", file.getName(), container);

        Blob blob = context.getBlobStore().blobBuilder(container)
                .name(file.getName())
                .payload(file)
View Full Code Here

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

                @Override
                public Writer updateEntity( final EntityReference ref, EntityDescriptor entityDescriptor )
                    throws IOException
                {
                    if( !blobStore.blobExists( container, ref.identity() ) )
                    {
                        throw new EntityNotFoundException( ref );
                    }
                    return new StringWriter()
                    {
View Full Code Here

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

                @Override
                public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
                    throws EntityNotFoundException
                {
                    if( !blobStore.blobExists( container, ref.identity() ) )
                    {
                        throw new EntityNotFoundException( ref );
                    }
                    blobStore.removeBlob( container, ref.identity() );
                }
View Full Code Here

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

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

      if (!blobStore.blobExists(containerName, blobName)) {
          throw new KeyNotFoundException(containerName, blobName, "while checking existence");
      }
      return null;
   }
}
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.