List of utility methods to do AtomicInteger
String | getThreadName(String pattern, String name) Creates a new thread name with the given prefix if (pattern == null) { pattern = DEFAULT_PATTERN; if (name.indexOf("$") > -1) { name = name.replaceAll("\\$", "CAMEL_REPLACE_ME"); String longName = name; String shortName = name.contains("?") ? before(name, "?") : name; ... |
UUID | getTimeBasedUUID() Generates Type 1 UUID. long time = ((System.currentTimeMillis() * HUNDRED_NANOS_PER_MILLI) + NUM_100NS_INTERVALS_SINCE_UUID_EPOCH) + (count.incrementAndGet() % HUNDRED_NANOS_PER_MILLI); long timeLow = (time & LOW_MASK) << SHIFT_4; long timeMid = (time & MID_MASK) >> SHIFT_2; long timeHi = (time & HIGH_MASK) >> SHIFT_6; long most = timeLow | timeMid | TYPE1 | timeHi; return new UUID(most, least); |
int | getUniqueId() get Unique Id return ID_GENERATOR.getAndIncrement();
|
String | getUuidAsFourCharacterGroups() get Uuid As Four Character Groups UUID uuid = getTimeBasedUUID(); String uuid_s = uuid.toString(); String[] parts = uuid_s.split("-", 0); StringBuilder sb = new StringBuilder(); for (String p : parts) { if (p.length() <= 4) { sb.append('-').append(p); } else { ... |
void | increase(A a, Map map) increase AtomicInteger val = map.get(a); if (val == null) { val = new AtomicInteger(1); map.put(a, val); } else { val.addAndGet(1); |
boolean | isPropBlocked(String s) is Prop Blocked AtomicInteger i = updatingProps.get(s); if (i == null) { return false; return i.get() > 0; |
int | loadServiceCount(String id) load Service Count AtomicInteger count = m_service_load_count_map.get(id); if (count == null) { count = new AtomicInteger(1); m_service_load_count_map.put(id, count); return 1; } else { return count.incrementAndGet(); |
void | print2DIntArray(int[][] array) print D Int Array for (int i = 0; i < array.length; i++) { for (int j = 0; j < array[i].length; j++) { System.out.print(array[i][j] + " "); System.out.println(); |
void | printResults(Stream Prints the resultPartitionsStream to the standard out printResults(resultPartitionsStream, false); |
void | reset() reset loaderId.set(LOADER_ID_START); |