public class SequenceReactiveIdentifierGenerator extends BlockingIdentifierGenerator implements org.hibernate.id.Configurable
SequenceGenerator
.
This implementation supports block allocation, but does not guarantee that generated identifiers are sequential.
Modifier and Type | Field and Description |
---|---|
static java.lang.Object[] |
NO_PARAMS |
Constructor and Description |
---|
SequenceReactiveIdentifierGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.hibernate.type.Type type,
java.util.Properties params,
org.hibernate.service.ServiceRegistry serviceRegistry) |
protected int |
determineIncrementForSequenceEmulation(java.util.Properties params) |
protected int |
getBlockSize()
The block size (the number of "lo" values for each "hi" value)
|
protected java.util.concurrent.CompletionStage<java.lang.Long> |
nextHiValue(ReactiveConnectionSupplier session)
Allocate a new block, by obtaining the next "hi" value from the database
|
generate, next, next
protected int getBlockSize()
BlockingIdentifierGenerator
getBlockSize
in class BlockingIdentifierGenerator
protected java.util.concurrent.CompletionStage<java.lang.Long> nextHiValue(ReactiveConnectionSupplier session)
BlockingIdentifierGenerator
nextHiValue
in class BlockingIdentifierGenerator
public void configure(org.hibernate.type.Type type, java.util.Properties params, org.hibernate.service.ServiceRegistry serviceRegistry)
configure
in interface org.hibernate.id.Configurable
protected int determineIncrementForSequenceEmulation(java.util.Properties params)