@Test @PerfTest(invocations = 750000, threads = 50) public void testConcurrentCreation() throws Exception { String id = generator.generateStringID(Long.toString(System.currentTimeMillis())); if (ids.putIfAbsent(id, id) == null) { count.incrementAndGet(); } else { throw new IllegalStateException("The id '" + id + "' already exists"); } }
public String generateStringID(Object o) { return generateStringID(o, System.currentTimeMillis(), hexServerIP_, seeder_.nextInt()); }
IDGeneratorServiceImpl implements IDGeneratorService { public String generateStringID(Object o) { return generateStringID(o, System.currentTimeMillis(), hexServerIP_, seeder_.nextInt()); } }
IDGeneratorServiceImpl implements IDGeneratorService { public String generateStringID(Object o) { return generateStringID(o, System.currentTimeMillis(), hexServerIP_, seeder_.nextInt()); } IDGeneratorServiceImpl(); }
IDGeneratorServiceImpl implements IDGeneratorService { public String generateStringID(Object o) { return generateStringID(o, System.currentTimeMillis(), hexServerIP_, seeder_.nextInt()); } IDGeneratorServiceImpl(); Serializable generateID(Object o); long generateLongID(Object o); int generatIntegerID(Object o); String generateStringID(Object o); }
IDGeneratorServiceImpl implements IDGeneratorService { public String generateStringID(Object o) { return generateStringID(o, System.currentTimeMillis(), hexServerIP_, seeder_.nextInt()); } IDGeneratorServiceImpl(); Serializable generateID(Object o); long generateLongID(Object o); int generatIntegerID(Object o); String generateStringID(Object o);  }