View Javadoc
1   package ch.qos.logback.classic.spi;
2   
3   import java.util.concurrent.atomic.AtomicLong;
4   
5   /**
6    * 
7    * A very simple {@link SequenceNumberGenerator} based on an {@link AtomicLong} variable.
8    * 
9    * @author Ceki Gülcü
10   * @since 1.3.0
11   */
12  public class BasicSequenceNumberGenerator implements SequenceNumberGenerator {
13  
14      private final AtomicLong atomicLong = new AtomicLong();
15      
16      @Override
17      public long nextSequenceNumber() {
18          return atomicLong.incrementAndGet();
19      }
20  
21  }