本文整理了Java中org.apache.helix.ZNRecord.setModifiedTime()
方法的一些代码示例,展示了ZNRecord.setModifiedTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZNRecord.setModifiedTime()
方法的具体详情如下:
包路径:org.apache.helix.ZNRecord
类名称:ZNRecord
方法名:setModifiedTime
[英]Set the time that this record was last modified
[中]设置上次修改此记录的时间
代码示例来源:origin: apache/incubator-pinot
@Nullable
public static ZNRecord getZnRecord(@Nonnull ZkHelixPropertyStore<ZNRecord> propertyStore, @Nonnull String path) {
Stat stat = new Stat();
ZNRecord znRecord = propertyStore.get(path, stat, AccessOption.PERSISTENT);
if (znRecord != null) {
znRecord.setCreationTime(stat.getCtime());
znRecord.setModifiedTime(stat.getMtime());
znRecord.setVersion(stat.getVersion());
}
return znRecord;
}
代码示例来源:origin: org.apache.helix/helix-core
public static List<ZNRecord> getChildren(ZkClient client, String path) {
// parent watch will be set by zkClient
List<String> children = client.getChildren(path);
if (children == null || children.size() == 0) {
return Collections.emptyList();
}
List<ZNRecord> childRecords = new ArrayList<ZNRecord>();
for (String child : children) {
String childPath = path + "/" + child;
Stat newStat = new Stat();
ZNRecord record = client.readDataAndStat(childPath, newStat, true);
if (record != null) {
record.setVersion(newStat.getVersion());
record.setCreationTime(newStat.getCtime());
record.setModifiedTime(newStat.getMtime());
childRecords.add(record);
}
}
return childRecords;
}
代码示例来源:origin: apache/helix
public static List<ZNRecord> getChildren(HelixZkClient client, String path) {
// parent watch will be set by zkClient
List<String> children = client.getChildren(path);
if (children == null || children.size() == 0) {
return Collections.emptyList();
}
List<ZNRecord> childRecords = new ArrayList<ZNRecord>();
for (String child : children) {
String childPath = path + "/" + child;
Stat newStat = new Stat();
ZNRecord record = client.readDataAndStat(childPath, newStat, true);
if (record != null) {
record.setVersion(newStat.getVersion());
record.setCreationTime(newStat.getCtime());
record.setModifiedTime(newStat.getMtime());
record.setEphemeralOwner(newStat.getEphemeralOwner());
childRecords.add(record);
}
}
return childRecords;
}
代码示例来源:origin: apache/helix
if (record != null) {
record.setCreationTime(stat.getCtime());
record.setModifiedTime(stat.getMtime());
record.setVersion(stat.getVersion());
record.setEphemeralOwner(stat.getEphemeralOwner());
代码示例来源:origin: org.apache.helix/helix-core
if (record != null) {
record.setCreationTime(stat.getCtime());
record.setModifiedTime(stat.getMtime());
record.setVersion(stat.getVersion());
代码示例来源:origin: org.apache.helix/helix-core
if (record != null) {
record.setCreationTime(stat.getCtime());
record.setModifiedTime(stat.getMtime());
record.setVersion(stat.getVersion());
代码示例来源:origin: apache/helix
if (record != null) {
record.setCreationTime(stat.getCtime());
record.setModifiedTime(stat.getMtime());
record.setVersion(stat.getVersion());
record.setEphemeralOwner(stat.getEphemeralOwner());
代码示例来源:origin: apache/helix
copy.setModifiedTime(record.getModifiedTime());
copy.setEphemeralOwner(record.getEphemeralOwner());
内容来源于网络,如有侵权,请联系作者删除!