public class AUIDGenerator extends AbstractGenerator<String>
This generator can be used in concurrent applications. It is especially useful in situations where large numbers of transactions within a certain amount of time have to be made, and the additional overhead of synchronizing the concurrent creation of unique identifiers through the database would break performance limits.
There are no properties for this ValueGenerator.
Note: Due to limitations of the available Java API there is a chance of less than 1:2^62 that two concurrently running JVMs will produce the same identifiers, which is in practical terms never, because your database server will have crashed a million times before this happens.
allocationSize, block, initialValue, name, properties, repositoryExists
PROPERTY_CATALOG_NAME, PROPERTY_CLASS_NAME, PROPERTY_COLUMN_NAME, PROPERTY_FIELD_NAME, PROPERTY_KEY_CACHE_SIZE, PROPERTY_KEY_DATABASE_CACHE_SIZE, PROPERTY_KEY_INITIAL_VALUE, PROPERTY_KEY_MAX_VALUE, PROPERTY_KEY_MIN_VALUE, PROPERTY_ROOT_CLASS_NAME, PROPERTY_SCHEMA_NAME, PROPERTY_SEQUENCE_NAME, PROPERTY_SEQUENCETABLE_CATALOG, PROPERTY_SEQUENCETABLE_NAME_COLUMN, PROPERTY_SEQUENCETABLE_NEXTVAL_COLUMN, PROPERTY_SEQUENCETABLE_SCHEMA, PROPERTY_SEQUENCETABLE_TABLE, PROPERTY_TABLE_NAME
Constructor and Description |
---|
AUIDGenerator(String name,
Properties props) |
Modifier and Type | Method and Description |
---|---|
static Class |
getStorageClass()
Accessor for the storage class for values generated with this generator.
|
protected ValueGenerationBlock<String> |
reserveBlock(long size)
Method to reserve "size" values to the block.
|
allocate, createRepository, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock
public AUIDGenerator(String name, Properties props)
public static Class getStorageClass()
protected ValueGenerationBlock<String> reserveBlock(long size)
reserveBlock
in class AbstractGenerator<String>
size
- The block sizeCopyright © 2018. All rights reserved.