List of utility methods to do AtomicInteger
int | getPortOffset() The port offset is the range of ports that should not be used to find an open server port. return 1024 + PORT_OFFSET.get();
|
String | getPrefix(final String namespace, final Map get Prefix if (!namespacesPrefixesMap.containsKey(namespace)) { namespacesPrefixesMap.put(namespace, NAMESPACE_PREFIX_BASE + counter.incrementAndGet()); return namespacesPrefixesMap.get(namespace); |
String | getPrefixedTerm(String namespace, String localName) get Prefixed Term String prefix = nsMap.get(namespace); if (prefix == null) { prefix = "ns" + counter.getAndIncrement(); nsMap.put(namespace, prefix); return String.format("%s:%s", prefix, localName); |
Map | getQueryCounters() get Query Counters return queryCounters;
|
int | getRandom() get Random return serial.getAndIncrement();
|
String | getRandomTenantId() get Random Tenant Id return "T" + TENANT_PREFIX + TENANT_ID_COUNTER.incrementAndGet(); |
int | getReply() get Reply if (replyNO.get() < 10000000) { return replyNO.getAndIncrement(); } else { replyNO.set(0); return replyNO.getAndIncrement(); |
String | getSerialNum() get Serial Num int num = genrator.getAndIncrement(); num = Math.abs(num % 100); return String.format("%02d", num); |
String | getTempFileName() Method (3) StringBuilder res = new StringBuilder(12); res.append(seqStart); res.append(fromDecimal(ai.getAndIncrement())); return res.toString(); |
int | getThreadDumpId() get Thread Dump Id Integer id = threadDumpId.get(); if (id == null) { id = dumpId.incrementAndGet(); threadDumpId.set(id); return id; |