public class IdGenerators extends Object
| Constructor and Description |
|---|
IdGenerators() |
| Modifier and Type | Method and Description |
|---|---|
static IdGenerator<Integer> |
createIntGenerator()
Creates an ID generator using
AtomicInteger initialized to the specified value. |
static IdGenerator<Integer> |
createIntGenerator(int initValue)
Creates an ID generator using
AtomicInteger initialized to value |
static IdGenerator<Long> |
createLongGenerator()
Creates an ID generator using
AtomicLong initialized to the specified value. |
static IdGenerator<Long> |
createLongGenerator(long initValue)
Creates an ID generator using
AtomicLong initialized to value |
public IdGenerators()
public static IdGenerator<Integer> createIntGenerator(int initValue)
AtomicInteger initialized to value initValue - The initial value.public static IdGenerator<Integer> createIntGenerator()
AtomicInteger initialized to the specified value.public static IdGenerator<Long> createLongGenerator(long initValue)
AtomicLong initialized to value initValue - The initial value.public static IdGenerator<Long> createLongGenerator()
AtomicLong initialized to the specified value.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.