public final class HighLowKeyGenerator extends Object implements KeyGeneratorIF
Modifier and Type | Field and Description |
---|---|
protected ConnectionFactoryIF |
connfactory |
protected String |
database |
protected String |
global_entry |
protected int |
grabsize |
protected String |
keycol |
protected long |
max_value |
protected Map<String,String> |
properties |
protected String |
table |
protected String |
valcol |
protected long |
value |
Constructor and Description |
---|
HighLowKeyGenerator(ConnectionFactoryIF connfactory,
String table,
String keycol,
String valcol,
String global_entry,
int grabsize,
String database,
Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
IdentityIF |
generateKey(Class<?> type)
INTERNAL: Generates a new object identity of the specified object
type.
|
protected long |
incrementInDatabase(Object type)
INTERNAL: Sends a request to the database to retrieve the current
counter value.
|
protected ConnectionFactoryIF connfactory
protected String table
protected String keycol
protected String valcol
protected int grabsize
protected String global_entry
protected String database
protected long value
protected long max_value
public IdentityIF generateKey(Class<?> type)
KeyGeneratorIF
generateKey
in interface KeyGeneratorIF
protected long incrementInDatabase(Object type)