org.apache.brooklyn.util.time.Time.makeDateSimpleStampString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(131)

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

Time.makeDateSimpleStampString介绍

[英]returns the current time in #DATE_FORMAT_SIMPLE_STAMP format, suitable for machines to read but easier for humans too, like #makeDateStampString() but not as precise
[中]以#DATE _FORMAT _SIMPLE _stampformat#返回当前时间,适用于机器阅读,但也更易于人类阅读,比如#makeDateStampString(),但没有那么精确

代码示例

代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common

/** returns the current time in {@value #DATE_FORMAT_SIMPLE_STAMP} format, 
 * suitable for machines to read but easier for humans too, 
 * like {@link #makeDateStampString()} but not as precise */
public static String makeDateSimpleStampString() {
  return makeDateSimpleStampString(System.currentTimeMillis());
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-core

/** Appends a standard format subpath sub-path to the path returned by {@link #resolve()}.
 * <p>
 * For example, this might write to:
 * <code>~/.brooklyn/brooklyn-persisted-state/backups/2014-11-13-1201-n0deId-promotion-sA1t */
public String resolveWithSubpathFor(ManagementContext managementContext, String label) {
  return resolveWithSubpath(Time.makeDateSimpleStampString()+"-"+managementContext.getManagementNodeId()+"-"+label+"-"+Identifiers.makeRandomId(4));
}
@Override

代码示例来源:origin: org.apache.brooklyn/brooklyn-rest-resources

String label = mgmt().getManagementNodeId()+"-"+Time.makeDateSimpleStampString();
PersistenceObjectStore targetStore = BrooklynPersistenceUtils.newPersistenceObjectStore(mgmt(), null, 
  "tmp/web-persistence-"+label+"-"+Identifiers.makeRandomId(4));

代码示例来源:origin: org.apache.brooklyn/brooklyn-core

String label = origManagementContext.getManagementNodeId()+"-"+Time.makeDateSimpleStampString();
PersistenceObjectStore targetStore = BrooklynPersistenceUtils.newPersistenceObjectStore(origManagementContext, null, 
  "tmp/web-persistence-"+label+"-"+Identifiers.makeRandomId(4));

相关文章