@Test public void base62() throws Exception { DummyFlakeGenerator generator = new DummyFlakeGenerator(1001, fixed(4, 3), "gen43"); FlakeId flakeId = generator.next(); assertEquals("cCRjZpXdiL", flakeId.toString()); assertEquals(flakeId, FlakeId.fromString("cCRjZpXdiL")); FlakeId next = generator.next(); assertEquals("cCRjZpXdzh", next.toString()); assertEquals(next, FlakeId.fromString("cCRjZpXdzh")); }
public final FlakeId next() { return new FlakeId(getCurrentSequenceTime(), nodeId); }
FlakeIdGenerator { public final FlakeId next() { return new FlakeId(getCurrentSequenceTime(), nodeId); } }
FlakeIdGenerator { public final FlakeId next() { return new FlakeId(getCurrentSequenceTime(), nodeId); } protected  FlakeIdGenerator(int nodeId); @VisibleForTesting  FlakeIdGenerator(int nodeId, Clock clock, String scope); }
FlakeIdGenerator { public final FlakeId next() { return new FlakeId(getCurrentSequenceTime(), nodeId); } protected  FlakeIdGenerator(int nodeId); @VisibleForTesting  FlakeIdGenerator(int nodeId, Clock clock, String scope); final FlakeId next(); final int getNodeId(); }
FlakeIdGenerator { public final FlakeId next() { return new FlakeId(getCurrentSequenceTime(), nodeId); } protected  FlakeIdGenerator(int nodeId); @VisibleForTesting  FlakeIdGenerator(int nodeId, Clock clock, String scope); final FlakeId next(); final int getNodeId();  }