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

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

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

BlobStore.blobMetadata介绍

[英]Retrieves the metadata of a Blob at location container/name
[中]检索位于容器/名称位置的Blob的元数据

代码示例

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

BlobStore blobStore, String containerName,
  String blobName) throws IOException, S3Exception {
BlobMetadata metadata = blobStore.blobMetadata(containerName, blobName);
if (metadata == null) {
  throw new S3Exception(S3ErrorCode.NO_SUCH_KEY);

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

BlobMetadata blobMetadata = blobStore.blobMetadata(destContainerName,
    destBlobName);
response.setCharacterEncoding(UTF_8);

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

@Override
public BlobMetadata blobMetadata(String container, String name) {
 return delegate().blobMetadata(container, name);
}

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

@Override
public BlobMetadata blobMetadata(String container, String name) {
 return delegate().blobMetadata(container, name);
}

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

@Override
public BlobMetadata blobMetadata(String container, String name) {
 return delegate().blobMetadata(container, name);
}

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

@Override
public BlobMetadata blobMetadata(String container, String name) {
 return delegate().blobMetadata(container, name);
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

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

public StorageMetadata execute(String containerName, String directory) {
   BlobMetadata md = connection.blobMetadata(containerName, directory);
   if (md != null && md.getContentMetadata().getContentType().equals("application/directory"))
     return resource2Directory.apply(md);
   for (String suffix : BlobStoreConstants.DIRECTORY_SUFFIXES) {
     md = connection.blobMetadata(containerName, directory + suffix);
     if (md != null)
      return resource2Directory.apply(md);
   }
   return null;
  }
}

代码示例来源:origin: apache/jackrabbit-oak

@Override
public long countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception {
  Preconditions.checkNotNull(context);
  long count = 0;
  for (String chunkId : chunkIds) {
    final org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore();
    StorageMetadata metadata = blobStore.blobMetadata(cloudContainer, chunkId);
    if ((maxLastModifiedTime <= 0) 
        || (metadata.getLastModified().getTime() <= maxLastModifiedTime)) {
      blobStore.removeBlob(cloudContainer, chunkId);
      count++;
    }
  }
  return count;
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

@Override
public long countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception {
  Preconditions.checkNotNull(context);
  long count = 0;
  for (String chunkId : chunkIds) {
    final org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore();
    StorageMetadata metadata = blobStore.blobMetadata(cloudContainer, chunkId);
    if ((maxLastModifiedTime <= 0) 
        || (metadata.getLastModified().getTime() <= maxLastModifiedTime)) {
      blobStore.removeBlob(cloudContainer, chunkId);
      count++;
    }
  }
  return count;
}

代码示例来源:origin: org.apache.jackrabbit/oak-blob-plugins

@Override
public long countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception {
  Preconditions.checkNotNull(context);
  long count = 0;
  for (String chunkId : chunkIds) {
    final org.jclouds.blobstore.BlobStore blobStore = context.getBlobStore();
    StorageMetadata metadata = blobStore.blobMetadata(cloudContainer, chunkId);
    if ((maxLastModifiedTime <= 0) 
        || (metadata.getLastModified().getTime() <= maxLastModifiedTime)) {
      blobStore.removeBlob(cloudContainer, chunkId);
      count++;
    }
  }
  return count;
}

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

@Override
  protected void checkMD5(String container, String name, byte[] md5) {
   // atmos does not support content-md5 yet
   assertEquals(view.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null);
  }
}

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

protected void checkMD5(String container, String name, byte[] md5) {
 assertEquals(view.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), md5);
}

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

protected void checkMD5(String container, String name, byte[] md5) {
 assertEquals(view.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), md5);
}

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

protected void testPutBlobTierHelper(Tier tier, PutOptions options) throws Exception {
 String blobName = "put-blob-tier-" + tier;
 ByteSource payload = createTestInput(1024);
 BlobStore blobStore = view.getBlobStore();
 String containerName = getContainerName();
 try {
   Blob blob = blobStore.blobBuilder(blobName)
    .payload(payload)
    .contentLength(payload.size())
    .tier(tier)
    .build();
   blobStore.putBlob(containerName, blob, options);
   checkTier(blobStore.blobMetadata(containerName, blobName), tier);
 } finally {
   returnContainer(containerName);
 }
}

相关文章