Package org.hibernate.reactive.id
Interface ReactiveIdentifierGenerator<Id>
- All Superinterfaces:
org.hibernate.generator.BeforeExecutionGenerator,Configurable,ExportableProducer,org.hibernate.generator.Generator,IdentifierGenerator,Serializable
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:
-
Field Summary
Fields inherited from interface org.hibernate.id.IdentifierGenerator
CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME -
Method Summary
Modifier and TypeMethodDescriptiondefault Objectgenerate(SharedSessionContractImplementor session, Object object) default Idgenerate(SharedSessionContractImplementor session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType) generate(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.BeforeExecutionGenerator
generatedOnExecutionMethods inherited from interface org.hibernate.id.Configurable
configure, initializeMethods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnForceIncrement, generatesOnInsert, generatesOnUpdate, generatesSometimesMethods inherited from interface org.hibernate.id.IdentifierGenerator
configure, getEventTypes, registerExportables
-
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)
-