Java AtomicLong getNextTestIndexName()

Here you can find the source of getNextTestIndexName()

Description

get Next Test Index Name

License

Open Source License

Declaration

public static String getNextTestIndexName() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2015 Eclipse RDF4J contributors.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Distribution License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *******************************************************************************/

import java.util.concurrent.atomic.AtomicLong;

public class Main {
    /**/*from  ww w .  ja v a2 s .c om*/
     * Counter used to uniquely name test indexes without using UUID's that may be causing path length issues.
     */
    private static final AtomicLong TEST_COUNTER = new AtomicLong(0);

    public static String getNextTestIndexName() {
        return "rdf4j-es-testindex-" + TEST_COUNTER.incrementAndGet();
    }
}

Related

  1. getMessageId()
  2. getMethodExecuteCount()
  3. getMeUniqueString(Calendar cal)
  4. getMmapBufferUsage()
  5. getNativeSeed(Random rand)
  6. getNowMicrosUtc()
  7. getRAMUniqueID()
  8. getRandomTopicName()
  9. getSequenceNumber()