当前位置: 首页>>代码示例>>Java>>正文


Java StorageMetadata.getType方法代码示例

本文整理汇总了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;
}
 
开发者ID:brdara,项目名称:java-cloud-filesystem-provider,代码行数:19,代码来源:CloudBasicFileAttributes.java

示例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;
    }
}
 
开发者ID:bouncestorage,项目名称:swiftproxy,代码行数:21,代码来源:Utils.java

示例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;
    }
}
 
开发者ID:bouncestorage,项目名称:bouncestorage,代码行数:19,代码来源:Utils.java

示例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;
        }
    }
 
开发者ID:NLeSC,项目名称:Xenon,代码行数:13,代码来源:JCloudsFileSytem.java


注:本文中的org.jclouds.blobstore.domain.StorageMetadata.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。