Examples of MicrosecondsClockResolution


Examples of me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution

      if (clockResolutionName.equals(ClockResolution.SECONDS)) {
          return new SecondsClockResolution();
      } else if (clockResolutionName.equals(ClockResolution.MILLISECONDS)) {
          return new MillisecondsClockResolution();
      } else if (clockResolutionName.equals(ClockResolution.MICROSECONDS)) {
          return new MicrosecondsClockResolution();
      } else if (clockResolutionName.equals(ClockResolution.MICROSECONDS_SYNC)) {
          return new MicrosecondsSyncClockResolution();
      }
      throw new RuntimeException(String.format("Unsupported clock resolution: %s", clockResolutionName));
  }
View Full Code Here

Examples of me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution

   * This test must be placed FIRST. Please don't change the order.
   * @throws Exception
   */
  @Test
  public void testTimeUUIDWithClockResolution() throws Exception {
    ClockResolution clock = new MicrosecondsClockResolution();
    long time = clock.createClock();

    // Invoke twice with same time. Both generated UUID should be the same.
    // Test improved algorithm.
    assertEquals(TimeUUIDUtils.getTimeUUID(time),
        java.util.UUID.fromString(
View Full Code Here

Examples of me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution

    if (clockResolutionName.equals(ClockResolution.SECONDS)) {
      return new SecondsClockResolution();
    } else if (clockResolutionName.equals(ClockResolution.MILLISECONDS)) {
      return new MillisecondsClockResolution();
    } else if (clockResolutionName.equals(ClockResolution.MICROSECONDS)) {
      return new MicrosecondsClockResolution();
    } else if (clockResolutionName.equals(ClockResolution.MICROSECONDS_SYNC)) {
      return new MicrosecondsSyncClockResolution();
    }
    throw new RuntimeException(String.format(
        "Unsupported clock resolution: %s", clockResolutionName));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.