Java AtomicLong Accumulator getIncrement()

Here you can find the source of getIncrement()

Description

get Increment

License

Apache License

Declaration

private static LongAdder getIncrement() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.atomic.LongAdder;

public class Main {
    private static final ThreadLocal<LongAdder> increment = new ThreadLocal<LongAdder>();

    private static LongAdder getIncrement() {
        LongAdder adder = increment.get();
        if (adder == null) {
            adder = new LongAdder();
            increment.set(adder);//from www.  j a  va  2  s  .  com
        }
        return adder;
    }
}

Related

  1. addInlineCollectionToSqlString(StringBuilder sql, Collection values)
  2. calculateMemory()
  3. getDefaultSSLProtocol()
  4. getEnabledSSLProtocols()
  5. min(List list)
  6. random()
  7. setEnabledSSLProtocols(final Collection enabledSSLProtocols)
  8. signalAll(AtomicBoolean condition)