Package org.hibernate.reactive.id
Interface ReactiveIdentifierGenerator<Id>
- All Superinterfaces:
org.hibernate.generator.Generator,Serializable
@Incubating
public interface ReactiveIdentifierGenerator<Id>
extends org.hibernate.generator.Generator
A replacement for
IdentifierGenerator,
which supports a non-blocking method for obtaining the generated
identifier.
A custom generation strategy may be defined by implementing this
interface, and, optionally, Configurable,
and declaring the custom implementation class using
GenericGenerator.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongenerate(ReactiveConnectionSupplier session, Object entity) Returns a generated identifier, via aCompletionStage.default CompletionStage<Id>generate(ReactiveConnectionSupplier session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType) Methods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes, getEventTypes
-
Method Details
-
generate
Returns a generated identifier, via aCompletionStage.- Parameters:
session- the reactive session
-
generate
default CompletionStage<Id> generate(ReactiveConnectionSupplier session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType)
-