@Test public void shouldGenerateMonotonicId() { IdGeneratorImpl idGen = new IdGeneratorImpl(); Int128 id1 = idGen.genId(); Int128 id2 = idGen.genId(); assertTrue(id1.compareTo(id2) < 0); }
@Override public synchronized Int128 genId() { return genIdInternal(); }
IdGeneratorImpl implements IdGenerator { @Override public synchronized Int128 genId() { return genIdInternal(); } }
IdGeneratorImpl implements IdGenerator { @Override public synchronized Int128 genId() { return genIdInternal(); } IdGeneratorImpl(); }
IdGeneratorImpl implements IdGenerator { @Override public synchronized Int128 genId() { return genIdInternal(); } IdGeneratorImpl(); Int128 genIdInternal(); @Override synchronized Int128 genId(); }
IdGeneratorImpl implements IdGenerator { @Override public synchronized Int128 genId() { return genIdInternal(); } IdGeneratorImpl(); Int128 genIdInternal(); @Override synchronized Int128 genId();  }