public class SequenceReactiveIdentifierGenerator extends Object implements ReactiveIdentifierGenerator<Long>
javax.persistence.SequenceGenerator
. This implementation supports block allocation, but does not guarantee that generated identifiers are sequential.
Constructor and Description |
---|
SequenceReactiveIdentifierGenerator() |
Modifier and Type | Method and Description |
---|---|
void | configure(Type type, Properties params, ServiceRegistry serviceRegistry) |
protected int | determineIncrementForSequenceEmulation(Properties params) |
CompletionStage<Long> | generate(ReactiveConnectionSupplier session, Object entity) Returns a generated identifier, via a CompletionStage . |
public static final Object[] NO_PARAMS
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry)
public CompletionStage<Long> generate(ReactiveConnectionSupplier session, Object entity)
ReactiveIdentifierGenerator
CompletionStage
.generate
in interface ReactiveIdentifierGenerator<Long>
session
- the reactive sessionprotected int determineIncrementForSequenceEmulation(Properties params)