gpt4 book ai didi

io.atomix.utils.time.WallClockTimestamp.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 09:17:05 24 4
gpt4 key购买 nike

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

WallClockTimestamp.<init>介绍

暂无

代码示例

代码示例来源:origin: atomix/atomix

@Override
 public Timestamp get(Object entry) {
  return new WallClockTimestamp();
 }
}

代码示例来源:origin: atomix/atomix

/**
 * Returns a new wall clock timestamp for the given unix timestamp.
 *
 * @param unixTimestamp the unix timestamp for which to create a new wall clock timestamp
 * @return the wall clock timestamp
 */
public static WallClockTimestamp from(long unixTimestamp) {
 return new WallClockTimestamp(unixTimestamp);
}

代码示例来源:origin: atomix/atomix

@Override
 public WallClockTimestamp getTime() {
  return new WallClockTimestamp(currentTimestamp);
 }
};

代码示例来源:origin: atomix/atomix

@Override
public WallClockTimestamp getTime() {
 return new WallClockTimestamp();
}

代码示例来源:origin: atomix/atomix

/**
 * Resets the current index to the given index and timestamp.
 *
 * @param index     the index to which to reset the current index
 * @param timestamp the timestamp to which to reset the current timestamp
 */
public void resetIndex(long index, long timestamp) {
 currentOperation = OperationType.COMMAND;
 operationIndex = index;
 currentIndex = index;
 currentTimestamp = timestamp;
 setCommitIndex(index);
 service.tick(new WallClockTimestamp(currentTimestamp));
}

代码示例来源:origin: atomix/atomix

/**
 * Takes snapshots for the given index.
 */
Snapshot snapshot() {
 Snapshot snapshot = raft.getSnapshotStore().newTemporarySnapshot(raft.getLastApplied(), new WallClockTimestamp());
 try (SnapshotWriter writer = snapshot.openWriter()) {
  for (RaftServiceContext service : raft.getServices()) {
   writer.buffer().mark();
   SnapshotWriter serviceWriter = new SnapshotWriter(writer.buffer().writeInt(0).slice(), writer.snapshot());
   snapshotService(serviceWriter, service);
   int length = serviceWriter.buffer().position();
   writer.buffer().reset().writeInt(length).skip(length);
  }
 } catch (Exception e) {
  snapshot.close();
  logger.error("Failed to snapshot services", e);
  throw e;
 }
 return snapshot;
}

代码示例来源:origin: io.atomix/atomix-gossip

@Override
 public Timestamp get(Object entry) {
  return new WallClockTimestamp();
 }
}

代码示例来源:origin: io.atomix/atomix-utils

/**
 * Returns a new wall clock timestamp for the given unix timestamp.
 *
 * @param unixTimestamp the unix timestamp for which to create a new wall clock timestamp
 * @return the wall clock timestamp
 */
public static WallClockTimestamp from(long unixTimestamp) {
 return new WallClockTimestamp(unixTimestamp);
}

代码示例来源:origin: io.atomix/atomix-utils

@Override
public WallClockTimestamp getTime() {
 return new WallClockTimestamp();
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com