Examples of MicrosecondsSyncClockResolution


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

      } 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.MicrosecondsSyncClockResolution

    // Test improved algorithm.
    assertEquals(TimeUUIDUtils.getTimeUUID(time),
        java.util.UUID.fromString(
            new com.eaio.uuid.UUID(UUIDGen.createTime(time), UUIDGen.getClockSeqAndNode()).toString()));

    clock = new MicrosecondsSyncClockResolution();
    // Invoke twice with a clockResolution that guarantees unique timestamp. The second must be greater
    // than the first one.
    java.util.UUID first = TimeUUIDUtils.getTimeUUID(clock);
    java.util.UUID second = TimeUUIDUtils.getTimeUUID(clock);
    assertTrue(second.compareTo(first) > 0);
View Full Code Here

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

    } 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.