Package org.keycloak.connections.jpa
Interface AsynchronousCommitAllowed
- All Known Implementing Classes:
AdminEventEntity,AuthenticationSessionEntity,ClusterEventEntity,EventEntity,LoginFailureEntity,PersistentClientSessionEntity,PersistentUserSessionEntity,RootAuthenticationSessionEntity,SingleUseObjectEntity
public interface AsynchronousCommitAllowed
Marker interface for JPA entities that can tolerate asynchronous commit.
When a transaction only modifies entities that implement this interface (and whose
isAsyncCommitAllowed(EntityOperationType) returns true for the
respective operation). See AsyncCommitIntegrator for details.
This is currently only supported for PostgreSQL databases.
Entities that do NOT implement this interface are considered "important" — any modification to them forces synchronous commit for the entire transaction.
- Author:
- Alexander Schwartz
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether this entity allows asynchronous commit for the given operation type.
-
Method Details
-
isAsyncCommitAllowed
Whether this entity allows asynchronous commit for the given operation type.Returning
falsefor any operation that occurs during a transaction will force synchronous commit for the entire transaction.- Parameters:
operationType- the type of database operation being performed- Returns:
trueif the operation can tolerate asynchronous commit
-