Java AtomicLong getSequenceNumber()

Here you can find the source of getSequenceNumber()

Description

get Sequence Number

License

Open Source License

Declaration

public static String getSequenceNumber() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.atomic.AtomicLong;

public class Main {
    private static final AtomicLong atomicLong = new AtomicLong(0);

    public static String getSequenceNumber() {
        long id = atomicLong.addAndGet(1);
        return String.valueOf(id);
    }/*  w w w. j  a  v  a 2  s.c  o  m*/
}

Related

  1. getNativeSeed(Random rand)
  2. getNextTestIndexName()
  3. getNowMicrosUtc()
  4. getRAMUniqueID()
  5. getRandomTopicName()
  6. getTempDirName()
  7. getTomorrowTime()
  8. getTrackedAllocationStatus()
  9. getUniqueURIString()