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

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

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

BlobStore.removeBlob介绍

[英]Deletes a Blob representing the data at location container/name
[中]删除表示位置容器/名称处数据的Blob

代码示例

代码示例来源:origin: gaul/s3proxy

@Override
  public Void call() {
    delegate().removeBlob(containerName, blobName);
    return null;
  }
});

代码示例来源:origin: gaul/s3proxy

private static void handleBlobRemove(HttpServletResponse response,
    BlobStore blobStore, String containerName,
    String blobName) throws IOException, S3Exception {
  blobStore.removeBlob(containerName, blobName);
  response.sendError(HttpServletResponse.SC_NO_CONTENT);
}

代码示例来源:origin: gaul/s3proxy

@Override
public void removeBlob(final String containerName, final String blobName) {
  writeStore.removeBlob(containerName, blobName);
  schedule(new Callable<Void>() {
      @Override
      public Void call() {
        delegate().removeBlob(containerName, blobName);
        return null;
      }
    });
}

代码示例来源:origin: gaul/s3proxy

private static void handleAbortMultipartUpload(HttpServletResponse response,
    BlobStore blobStore, String containerName, String blobName,
    String uploadId) throws IOException, S3Exception {
  if (Quirks.MULTIPART_REQUIRES_STUB.contains(getBlobStoreType(
      blobStore))) {
    if (!blobStore.blobExists(containerName, uploadId)) {
      throw new S3Exception(S3ErrorCode.NO_SUCH_UPLOAD);
    }
    blobStore.removeBlob(containerName, uploadId);
  }
  // TODO: how to reconstruct original mpu?
  MultipartUpload mpu = MultipartUpload.create(containerName,
      blobName, uploadId, createFakeBlobMetadata(blobStore),
      new PutOptions());
  blobStore.abortMultipartUpload(mpu);
  response.sendError(HttpServletResponse.SC_NO_CONTENT);
}

代码示例来源:origin: gaul/s3proxy

blobStore.removeBlob(containerName, uploadId);

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

@Override public Void call() throws Exception {
   blobstore.removeBlob(containerName, name);
   return null;
 }
}));

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

@Override
  public Void call() {
   blobStore.removeBlob(containerName, fullPath);
   return null;
  }
});

代码示例来源:origin: opendedup/sdfs

private void removeMetaData(String name) {
  if (this.accessStore || this.atmosStore || b2Store) {
    blobStore.removeBlob(this.name, name + mdExt);
  }
}

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

@Override public Void call() throws Exception {
   blobstore.removeBlob(containerName, name);
   return null;
 }
}));

代码示例来源:origin: org.gaul/s3proxy

@Override
  public Void call() {
    delegate().removeBlob(containerName, blobName);
    return null;
  }
});

代码示例来源:origin: Nextdoor/bender

@Override
  public Void call() {
    delegate().removeBlob(containerName, blobName);
    return null;
  }
});

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

@Override
public Blob remove(Object key) {
 Blob old = getLastValue(checkNotNull(key, "key"));
 String realKey = prefixer.apply(key.toString());
 blobstore.removeBlob(containerName, realKey);
 return old;
}

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

@Override
public InputStream remove(Object o) {
 InputStream old = get(o);
 String realKey = prefixer.apply(o.toString());
 blobstore.removeBlob(containerName, realKey);
 return old;
}

代码示例来源:origin: Nextdoor/bender

@Override
public void removeBlob(final String containerName, final String blobName) {
  writeStore.removeBlob(containerName, blobName);
  schedule(new Callable<Void>() {
      @Override
      public Void call() {
        delegate().removeBlob(containerName, blobName);
        return null;
      }
    });
}

代码示例来源:origin: apache/attic-whirr

@Override
 public void destroy() throws IOException {
  context.getBlobStore().removeBlob(container, blobName);
 }
}

代码示例来源:origin: gaul/are-we-consistent-yet

public int listAfterDelete() throws IOException {
  int count = 0;
  for (int i = 0; i < iterations; ++i) {
    String blobName = makeBlobName();
    blobStoreRead.putBlob(containerName, makeBlob(blobName, payload1));
    blobStore.removeBlob(containerName, blobName);
    if (listAllBlobs().contains(blobName)) {
      ++count;
    }
  }
  return count;
}

代码示例来源:origin: gaul/are-we-consistent-yet

public int listAfterCreate() throws IOException {
  int count = 0;
  for (int i = 0; i < iterations; ++i) {
    String blobName = makeBlobName();
    blobStore.putBlob(containerName, makeBlob(blobName, payload1));
    if (!listAllBlobs().contains(blobName)) {
      ++count;
    }
    blobStore.removeBlob(containerName, blobName);
  }
  return count;
}

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

@Test(groups = { "integration", "live" })
public void deleteObjectNoContainer() {
 try {
   view.getBlobStore().removeBlob("donb", "test");
 } catch (HttpResponseException e) {
   assertEquals(e.getResponse().getStatusCode(), 404);
 } catch (ContainerNotFoundException e) {
 }
}

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

@Test(groups = { "integration", "live" })
public void deleteObjectNotFound() throws InterruptedException {
 String container = getContainerName();
 String name = "test";
 try {
   view.getBlobStore().removeBlob(container, name);
 } finally {
   returnContainer(container);
 }
}

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

@Test(groups = { "integration", "live" }, dataProvider = "delete")
public void deleteObject(String name) throws InterruptedException {
 String container = getContainerName();
 try {
   addBlobToContainer(container, name, name, MediaType.TEXT_PLAIN);
   view.getBlobStore().removeBlob(container, name);
   assertContainerEmptyDeleting(container, name);
 } finally {
   returnContainer(container);
 }
}

相关文章