Package me.prettyprint.cassandra.service.clock

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


   * 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

    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

Related Classes of me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution

Copyright © 2018 www.massapicom. 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.