Java AtomicLong getUniqueURIString()

Here you can find the source of getUniqueURIString()

Description

Returns a URI unique within a test run.

License

LGPL

Declaration

public static String getUniqueURIString() 

Method Source Code

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

import java.util.concurrent.atomic.AtomicLong;

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

    /** Returns a URI unique within a test run. @return URI as a string */
    public static String getUniqueURIString() {
        return "http://example.com/"
                + Long.toString(uriCounter.incrementAndGet());
    }//from  w  w w .j  ava 2 s .c o m
}

Related

  1. getRandomTopicName()
  2. getSequenceNumber()
  3. getTempDirName()
  4. getTomorrowTime()
  5. getTrackedAllocationStatus()
  6. greaterAndSet(long value, AtomicLong atomicValue)
  7. isAtomicLong(final N number)
  8. joinThreads()
  9. lock()