use of org.javaswift.joss.model.StoredObject in project alluxio by Alluxio.
the class SwiftUnderFileSystem method getObjectStatus.
@Override
protected ObjectStatus getObjectStatus(String key) {
Container container = mAccount.getContainer(mContainerName);
StoredObject meta = container.getObject(key);
if (meta != null && meta.exists()) {
Date lastModifiedDate = meta.getLastModifiedAsDate();
Long lastModifiedTime = lastModifiedDate == null ? null : lastModifiedDate.getTime();
return new ObjectStatus(key, meta.getEtag(), meta.getContentLength(), lastModifiedTime);
}
return null;
}
Aggregations