@Test public void test() { List<UUID> uuids = new LinkedList<>(); for(int i=0;i<10000; i++) { uuids.add(UUIDUtil.genUUID()); } assertTrue(uuids.size()==10000); }
public static UUID genUUID() { UUID uuid = uuids.poll(); if ( null==uuid ) { uuid = UUID.randomUUID(); } if ( uuids.size()<=(MAX_QUEUE_LENGTH/5) ) { asyncGenUUIDs(); } return uuid; }
UUIDUtil { public static UUID genUUID() { UUID uuid = uuids.poll(); if ( null==uuid ) { uuid = UUID.randomUUID(); } if ( uuids.size()<=(MAX_QUEUE_LENGTH/5) ) { asyncGenUUIDs(); } return uuid; } }
UUIDUtil { public static UUID genUUID() { UUID uuid = uuids.poll(); if ( null==uuid ) { uuid = UUID.randomUUID(); } if ( uuids.size()<=(MAX_QUEUE_LENGTH/5) ) { asyncGenUUIDs(); } return uuid; }  }
UUIDUtil { public static UUID genUUID() { UUID uuid = uuids.poll(); if ( null==uuid ) { uuid = UUID.randomUUID(); } if ( uuids.size()<=(MAX_QUEUE_LENGTH/5) ) { asyncGenUUIDs(); } return uuid; }  static UUID genUUID(); static String genUUID58(); }
UUIDUtil { public static UUID genUUID() { UUID uuid = uuids.poll(); if ( null==uuid ) { uuid = UUID.randomUUID(); } if ( uuids.size()<=(MAX_QUEUE_LENGTH/5) ) { asyncGenUUIDs(); } return uuid; }  static UUID genUUID(); static String genUUID58();  }