Java AtomicLong createObjectID()

Here you can find the source of createObjectID()

Description

create Object ID

License

Open Source License

Declaration

public static long createObjectID() 

Method Source Code

//package com.java2s;

import java.util.concurrent.atomic.AtomicLong;

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

    public static long createObjectID() {
        return iCounter.addAndGet(1);
    }//from w ww  .j  av a  2 s.com
}

Related

  1. addstat(Map stat, String key)
  2. average(Stream stream)
  3. compareAndSetIfGreater(final AtomicLong dest, final long tryValue)
  4. createAtomicId()
  5. createId(final Long baseId)
  6. createUniqueFileName(String out)
  7. currentDate()
  8. generateId()
  9. generateId()