List of utility methods to do AtomicInteger
void | decrementStoredNoOfParts() decrement Stored No Of Parts storedNoOfParts.decrementAndGet(); |
int | decrementVxlanGpeRefCnt(final String vxlanGpePortKey, final String vppNode) decrement Vxlan Gpe Ref Cnt if (VXLAN_GPER_PORT_REF_CNT.get(vppNode) == null) { return 0; if (VXLAN_GPER_PORT_REF_CNT.get(vppNode).get(vxlanGpePortKey) == null) { return 0; return VXLAN_GPER_PORT_REF_CNT.get(vppNode).get(vxlanGpePortKey).decrementAndGet(); |
void | decrementWheelsCount() decrement Wheels Count synchronized (activeFutures) {
activeFutures.incrementAndGet();
activeFutures.notify();
|
int | deleteIndexedFields(Set Given a list of Strings and a map holding the index of each string, this method removes the strings and re-builds the index. List<String> copy = new ArrayList<String>(fields); fields.clear(); int singleIndex = -1; if (fieldsToDelete.size() == 1) { final AtomicInteger index = fieldIndexLookupMap.get(fieldsToDelete.iterator().next()); if (index != null) { singleIndex = index.intValue(); final int size = copy.size(); String fieldName; int i; for (i = 0; i < size; i++) { fieldName = copy.get(i); if (!fieldsToDelete.remove(fieldName)) { fields.add(fieldName); fieldIndexLookupMap.clear(); for (i = 0; i < fields.size(); i++) { fieldIndexLookupMap.put(fields.get(i), new AtomicInteger(i)); return singleIndex; |
String[] | encodeMap(Map encode Map String[] array = new String[map.size()]; AtomicInteger integer = new AtomicInteger(0); map.forEach((key, value) -> array[integer.getAndIncrement()] = key + "-" + value); return array; |
int | generateUniqueId() Generate unique id int. for (;;) { final int result = sNextGeneratedId.get(); int newValue = result + 1; if (newValue > 0x00FFFFFF) newValue = 1; if (sNextGeneratedId.compareAndSet(result, newValue)) { return result; |
int | getAllocationFailureCount() Returns the number of allocation failures since the application started. return ALLOCATION_FAILURE_COUNT.get();
|
int | getAndResetInvocationCount() get And Reset Invocation Count return getAndResetInvocationCount(DEFAULT_COUNTER);
|
int | getAndResetInvocationCount() get And Reset Invocation Count return COUNTER.getAndSet(0);
|
int | getCriticalExceptionCount() get Critical Exception Count int ret = criticalCount.get(); return ret; |