Java AtomicLong getMessageId()

Here you can find the source of getMessageId()

Description

get Message Id

License

Apache License

Declaration

public static String getMessageId() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.atomic.AtomicLong;

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

    public static String getMessageId() {
        return String.valueOf(sequence.getAndIncrement());
    }//from   ww  w .j a v  a  2s . c  o m
}

Related

  1. getBench(Map times, int amount)
  2. getDateSafe()
  3. getForeverUniqueID()
  4. getGlobalTimeStamp()
  5. getList(AtomicLongArray atomicLongArray)
  6. getMethodExecuteCount()
  7. getMeUniqueString(Calendar cal)
  8. getMmapBufferUsage()
  9. getNativeSeed(Random rand)