public final class UniqueLongGenerator extends Object
final UniqueLongGenerator uniqueLongGenerator = UniqueLongGenerator.getInstance();
long sequence = uniqueLongGenerator.getUniqueLong();
Note: The initial value is guaranteed to be positive. It is also guaranteed that you will get at least a million positive
values.SequentialIdGenerator
Modifier and Type | Method and Description |
---|---|
static UniqueLongGenerator |
getInstance()
Returns the instance of the UniqueLongGenerator class.
|
Long |
getUniqueLong()
Gets the next unique Long object.
|
long |
getUniqueLongValue()
Gets the next unique long value.
|
public static UniqueLongGenerator getInstance()
public Long getUniqueLong()
public long getUniqueLongValue()
Copyright © 2008–2018. All rights reserved.