Code example for AtomicLong

Methods: get, set

0
    } 
 
    @Override 
    public void register(Timer timer) {
        long active = numActive.incrementAndGet();
        if (maxActive.get() < active) {
            maxActive.set(active);
        } 
    } 
 
    @Override 
    public void collect(Timer.TimerResult timer) { 
        numActive.decrementAndGet();
    } 
 
    @Override 
    public Timer.TimerKey getKey() { 
        return key; 
    } 
 
    @Override