Code example for AtomicLong

Methods: getset

0
            throws IOException { 
        super(); 
        this.channel = channel;
        this.offset = offset;
        this.messageCount = new AtomicLong(0);
        this.sizeInBytes = new AtomicLong(0);
        this.highWaterMark = new AtomicLong(0);
        this.mutable = mutable;
        if (mutable) {
            final long startMs = System.currentTimeMillis();
            final long truncated = this.recover();
            if (this.messageCount.get() > 0) {
                log.info("Recovery succeeded in " + (System.currentTimeMillis() - startMs) / 1000 + " seconds. "
                        + truncated + " bytes truncated.");
            } 
        } 
        else { 
            try { 
                this.sizeInBytes.set(Math.min(channel.size(), limit) - offset);
                this.highWaterMark.set(this.sizeInBytes.get());
            } 
            catch (final Exception e) {
                log.error("Set sizeInBytes error", e);
            } 
        } 
Connect your IDE to all the code out there  Get Codota for Java