001package ch.qos.logback.core.spi;
002
003import java.util.concurrent.atomic.AtomicLong;
004
005/**
006 * 
007 * A very simple {@link SequenceNumberGenerator} based on an {@link AtomicLong}
008 * variable.
009 * 
010 * @author Ceki Gülcü
011 * @since 1.3.0
012 */
013public class BasicSequenceNumberGenerator extends ContextAwareBase implements SequenceNumberGenerator {
014
015    private final AtomicLong atomicLong = new AtomicLong();
016
017    @Override
018    public long nextSequenceNumber() {
019        return atomicLong.incrementAndGet();
020    }
021
022}