本文整理汇总了Java中org.jclouds.blobstore.domain.StorageMetadata.getType方法的典型用法代码示例。如果您正苦于以下问题:Java StorageMetadata.getType方法的具体用法?Java StorageMetadata.getType怎么用?Java StorageMetadata.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jclouds.blobstore.domain.StorageMetadata
的用法示例。
在下文中一共展示了StorageMetadata.getType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CloudBasicFileAttributes
import org.jclouds.blobstore.domain.StorageMetadata; //导入方法依赖的package包/类
public CloudBasicFileAttributes(StorageMetadata meta) {
lastModified = meta.getLastModified() == null ? FileTime.from(0L, TimeUnit.MILLISECONDS) :
FileTime.from(meta.getLastModified().getTime(), TimeUnit.MILLISECONDS);
created = meta.getCreationDate() == null ? lastModified : FileTime.from(meta.getCreationDate().getTime(), TimeUnit.MILLISECONDS);
key = meta.getProviderId();
storageType = meta.getType();
physicalLocation = meta.getLocation();
uri = meta.getUri();
size = Optional.ofNullable(meta.getSize()).orElse(Long.valueOf(0));
eTag = meta.getETag();
userMetadata = meta.getUserMetadata();
contentDisposition = null;
contentEncoding = null;
contentLanguage = null;
contentMD5 = null;
contentType = null;
expires = null;
}
示例2: computeNext
import org.jclouds.blobstore.domain.StorageMetadata; //导入方法依赖的package包/类
@Override
protected StorageMetadata computeNext() {
while (true) {
if (!iterator.hasNext()) {
if (marker == null) {
return endOfData();
}
advance();
continue;
}
StorageMetadata metadata = iterator.next();
// filter out folders with atmos and filesystem providers
// accept metadata == null for Google Cloud Storage folders
if (metadata == null || metadata.getType() == StorageType.RELATIVE_PATH) {
continue;
}
return metadata;
}
}
示例3: computeNext
import org.jclouds.blobstore.domain.StorageMetadata; //导入方法依赖的package包/类
@Override
protected StorageMetadata computeNext() {
while (true) {
if (!iterator.hasNext()) {
if (marker == null) {
return endOfData();
}
advance();
continue;
}
StorageMetadata metadata = iterator.next();
// filter out folders with atmos and filesystem providers
if (metadata.getType() == StorageType.RELATIVE_PATH) {
continue;
}
return metadata;
}
}
示例4: toPathAttributes
import org.jclouds.blobstore.domain.StorageMetadata; //导入方法依赖的package包/类
PathAttributes toPathAttributes(final StorageMetadata m) {
switch (m.getType()) {
case RELATIVE_PATH:
return makeDirAttributes(m);
case BLOB:
return makeBlobAttributes(m.getName());
default:
// Should never occur, as we filter the types.
return null;
}
}