Top Description Fields Constructors Methods
org.hibernate.internal

public final Class FastSessionServices

extends Object
Class Inheritance
Imports
java.util.Collection, .HashMap, .Map, .Objects, org.hibernate.CacheMode, .FlushMode, .HibernateException, .LockOptions, .TimeZoneStorageStrategy, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.dialect.Dialect, org.hibernate.engine.jdbc.batch.spi.BatchBuilder, org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, .MultiTenantConnectionProvider, org.hibernate.engine.jdbc.mutation.spi.MutationExecutorService, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.event.internal.EmptyEventManager, org.hibernate.event.spi.EventManager, .AutoFlushEventListener, .ClearEventListener, .DeleteEventListener, .DirtyCheckEventListener, .EntityCopyObserverFactory, .EventType, .EvictEventListener, .FlushEntityEventListener, .FlushEventListener, .InitializeCollectionEventListener, .LoadEventListener, .LockEventListener, .MergeEventListener, .PersistEventListener, .PostCollectionRecreateEventListener, .PostCollectionRemoveEventListener, .PostCollectionUpdateEventListener, .PostDeleteEventListener, .PostInsertEventListener, .PostLoadEvent, .PostLoadEventListener, .PostUpdateEventListener, .PreCollectionRecreateEventListener, .PreCollectionRemoveEventListener, .PreCollectionUpdateEventListener, .PreDeleteEventListener, .PreInsertEventListener, .PreLoadEventListener, .PreUpdateEventListener, .RefreshEventListener, .ReplicateEventListener, .ResolveNaturalIdEventListener, .SaveOrUpdateEventListener, org.hibernate.event.service.spi.EventListenerGroup, .EventListenerRegistry, org.hibernate.jpa.HibernateHints, .LegacySpecHints, .SpecHints, org.hibernate.jpa.internal.util.CacheModeHelper, .ConfigurationHelper, .LockOptionsHelper, org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.sql.ast.spi.ParameterMarkerStrategy, org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducerProvider, org.hibernate.type.format.FormatMapper, jakarta.persistence.CacheRetrieveMode, .CacheStoreMode, .PessimisticLockScope

Internal component.

Collects any components that any Session implementation will likely need for faster access and reduced allocations. Conceptually this acts as an immutable caching intermediary between Session and SessionFactory.

Designed to be immutable, shared across Session instances, and created infrequently, possibly only once per SessionFactory.

If the Session is requiring to retrieve (or compute) anything from the SessionFactory, and this computation would result in the same outcome for any Session created on this same SessionFactory, then it belongs in a final field of this class.

Finally, consider also limiting the size of each Session: some fields could be good candidates to be replaced with access via this object.

Author
Sanne Grinovero

Field Summary

Modifier and TypeField and Description
public final BatchBuilder
pack-priv final ClassLoaderService
pack-priv final ConnectionProvider
private final CacheRetrieveMode
private final CacheStoreMode
pack-priv final int
private final ConnectionObserverStatsBridge
pack-priv final LockOptions
pack-priv final BaselineSessionEventsListenerBuilder
pack-priv final Map<String, Object>
defaultSessionProperties

Default session properties

pack-priv final TimeZoneStorageStrategy
public final Dialect
pack-priv final boolean
pack-priv final boolean
public final EntityCopyObserverFactory
public final EventListenerGroup<AutoFlushEventListener>
public final EventListenerGroup<ClearEventListener>
public final EventListenerGroup<DeleteEventListener>
public final EventListenerGroup<DirtyCheckEventListener>
public final EventListenerGroup<EvictEventListener>
public final EventListenerGroup<FlushEventListener>
public final EventListenerGroup<FlushEntityEventListener>
public final EventListenerGroup<InitializeCollectionEventListener>
public final EventListenerGroup<LoadEventListener>
public final EventListenerGroup<LockEventListener>
public final EventListenerGroup<MergeEventListener>
public final EventListenerGroup<PersistEventListener>
public final EventListenerGroup<PersistEventListener>
public final EventListenerGroup<PostCollectionRecreateEventListener>
public final EventListenerGroup<PostCollectionRemoveEventListener>
public final EventListenerGroup<PostCollectionUpdateEventListener>
public final EventListenerGroup<PostDeleteEventListener>
public final EventListenerGroup<PostInsertEventListener>
public final EventListenerGroup<PostUpdateEventListener>
public final EventListenerGroup<PostDeleteEventListener>
public final EventListenerGroup<PostInsertEventListener>
public final EventListenerGroup<PostLoadEventListener>
public final EventListenerGroup<PostUpdateEventListener>
public final EventListenerGroup<PreCollectionRecreateEventListener>
public final EventListenerGroup<PreCollectionRemoveEventListener>
public final EventListenerGroup<PreCollectionUpdateEventListener>
public final EventListenerGroup<PreDeleteEventListener>
public final EventListenerGroup<PreInsertEventListener>
public final EventListenerGroup<PreLoadEventListener>
public final EventListenerGroup<PreUpdateEventListener>
public final EventListenerGroup<RefreshEventListener>
public final EventListenerGroup<ReplicateEventListener>
public final EventListenerGroup<ResolveNaturalIdEventListener>
public final EventListenerGroup<SaveOrUpdateEventListener>
public final EventListenerGroup<SaveOrUpdateEventListener>
public final EventListenerGroup<SaveOrUpdateEventListener>
private final EventManager
pack-priv final CacheMode
pack-priv final FlushMode
pack-priv final boolean
public final JdbcServices
private final JdbcValuesMappingProducerProvider
private final FormatMapper
pack-priv final MultiTenantConnectionProvider<Object>
private final MutationExecutorService
public final ParameterMarkerStrategy
pack-priv final int
pack-priv final boolean
pack-priv final TransactionCoordinatorBuilder
pack-priv final boolean
private final FormatMapper

Constructor Summary

AccessConstructor and Description
pack-priv
FastSessionServices(SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private static CacheRetrieveMode
private static CacheStoreMode
public void
firePostLoadEvent(final PostLoadEvent postLoadEvent)

pack-priv CacheRetrieveMode

Returns:

either the CacheRetrieveMode as defined in the Session specific properties, or as defined in the properties shared across all sessions (the defaults).
getCacheRetrieveMode
(Map<String, Object>
the Session properties
properties
)

pack-priv CacheStoreMode

Returns:

either the CacheStoreMode as defined in the Session specific properties, or as defined in the properties shared across all sessions (the defaults).
getCacheStoreMode
(final Map<String, Object>
the Session properties
properties
)

public ConnectionObserverStatsBridge
public TimeZoneStorageStrategy
public EventManager
public JdbcValuesMappingProducerProvider
public FormatMapper
public MutationExecutorService
public int
public FormatMapper
private static FlushMode
initializeDefaultFlushMode(Map<String, Object> defaultSessionProperties)

private static LockOptions
initializeDefaultLockOptions(final Map<String, Object> defaultSessionProperties)

private static Map<String, Object>
initializeDefaultSessionProperties(SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private static boolean
isTransactionAccessible(SessionFactoryImplementor factory, TransactionCoordinatorBuilder transactionCoordinatorBuilder)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private static <T> EventListenerGroup<T>
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

batchBuilderback to summary
public final BatchBuilder batchBuilder
classLoaderServiceback to summary
pack-priv final ClassLoaderService classLoaderService
connectionProviderback to summary
pack-priv final ConnectionProvider connectionProvider
defaultCacheRetrieveModeback to summary
private final CacheRetrieveMode defaultCacheRetrieveMode
defaultCacheStoreModeback to summary
private final CacheStoreMode defaultCacheStoreMode
defaultJdbcBatchSizeback to summary
pack-priv final int defaultJdbcBatchSize
defaultJdbcObserversback to summary
private final ConnectionObserverStatsBridge defaultJdbcObservers
defaultLockOptionsback to summary
pack-priv final LockOptions defaultLockOptions
defaultSessionEventListenersback to summary
pack-priv final BaselineSessionEventsListenerBuilder defaultSessionEventListeners
defaultSessionPropertiesback to summary
pack-priv final Map<String, Object> defaultSessionProperties

Default session properties

defaultTimeZoneStorageStrategyback to summary
pack-priv final TimeZoneStorageStrategy defaultTimeZoneStorageStrategy
dialectback to summary
public final Dialect dialect
disallowOutOfTransactionUpdateOperationsback to summary
pack-priv final boolean disallowOutOfTransactionUpdateOperations
discardOnCloseback to summary
pack-priv final boolean discardOnClose
entityCopyObserverFactoryback to summary
public final EntityCopyObserverFactory entityCopyObserverFactory
eventListenerGroup_AUTO_FLUSHback to summary
public final EventListenerGroup<AutoFlushEventListener> eventListenerGroup_AUTO_FLUSH
eventListenerGroup_CLEARback to summary
public final EventListenerGroup<ClearEventListener> eventListenerGroup_CLEAR
eventListenerGroup_DELETEback to summary
public final EventListenerGroup<DeleteEventListener> eventListenerGroup_DELETE
eventListenerGroup_DIRTY_CHECKback to summary
public final EventListenerGroup<DirtyCheckEventListener> eventListenerGroup_DIRTY_CHECK
eventListenerGroup_EVICTback to summary
public final EventListenerGroup<EvictEventListener> eventListenerGroup_EVICT
eventListenerGroup_FLUSHback to summary
public final EventListenerGroup<FlushEventListener> eventListenerGroup_FLUSH
eventListenerGroup_FLUSH_ENTITYback to summary
public final EventListenerGroup<FlushEntityEventListener> eventListenerGroup_FLUSH_ENTITY
eventListenerGroup_INIT_COLLECTIONback to summary
public final EventListenerGroup<InitializeCollectionEventListener> eventListenerGroup_INIT_COLLECTION
eventListenerGroup_LOADback to summary
public final EventListenerGroup<LoadEventListener> eventListenerGroup_LOAD
eventListenerGroup_LOCKback to summary
public final EventListenerGroup<LockEventListener> eventListenerGroup_LOCK
eventListenerGroup_MERGEback to summary
public final EventListenerGroup<MergeEventListener> eventListenerGroup_MERGE
eventListenerGroup_PERSISTback to summary
public final EventListenerGroup<PersistEventListener> eventListenerGroup_PERSIST
eventListenerGroup_PERSIST_ONFLUSHback to summary
public final EventListenerGroup<PersistEventListener> eventListenerGroup_PERSIST_ONFLUSH
eventListenerGroup_POST_COLLECTION_RECREATEback to summary
public final EventListenerGroup<PostCollectionRecreateEventListener> eventListenerGroup_POST_COLLECTION_RECREATE
eventListenerGroup_POST_COLLECTION_REMOVEback to summary
public final EventListenerGroup<PostCollectionRemoveEventListener> eventListenerGroup_POST_COLLECTION_REMOVE
eventListenerGroup_POST_COLLECTION_UPDATEback to summary
public final EventListenerGroup<PostCollectionUpdateEventListener> eventListenerGroup_POST_COLLECTION_UPDATE
eventListenerGroup_POST_COMMIT_DELETEback to summary
public final EventListenerGroup<PostDeleteEventListener> eventListenerGroup_POST_COMMIT_DELETE
eventListenerGroup_POST_COMMIT_INSERTback to summary
public final EventListenerGroup<PostInsertEventListener> eventListenerGroup_POST_COMMIT_INSERT
eventListenerGroup_POST_COMMIT_UPDATEback to summary
public final EventListenerGroup<PostUpdateEventListener> eventListenerGroup_POST_COMMIT_UPDATE
eventListenerGroup_POST_DELETEback to summary
public final EventListenerGroup<PostDeleteEventListener> eventListenerGroup_POST_DELETE
eventListenerGroup_POST_INSERTback to summary
public final EventListenerGroup<PostInsertEventListener> eventListenerGroup_POST_INSERT
eventListenerGroup_POST_LOADback to summary
public final EventListenerGroup<PostLoadEventListener> eventListenerGroup_POST_LOAD
eventListenerGroup_POST_UPDATEback to summary
public final EventListenerGroup<PostUpdateEventListener> eventListenerGroup_POST_UPDATE
eventListenerGroup_PRE_COLLECTION_RECREATEback to summary
public final EventListenerGroup<PreCollectionRecreateEventListener> eventListenerGroup_PRE_COLLECTION_RECREATE
eventListenerGroup_PRE_COLLECTION_REMOVEback to summary
public final EventListenerGroup<PreCollectionRemoveEventListener> eventListenerGroup_PRE_COLLECTION_REMOVE
eventListenerGroup_PRE_COLLECTION_UPDATEback to summary
public final EventListenerGroup<PreCollectionUpdateEventListener> eventListenerGroup_PRE_COLLECTION_UPDATE
eventListenerGroup_PRE_DELETEback to summary
public final EventListenerGroup<PreDeleteEventListener> eventListenerGroup_PRE_DELETE
eventListenerGroup_PRE_INSERTback to summary
public final EventListenerGroup<PreInsertEventListener> eventListenerGroup_PRE_INSERT
eventListenerGroup_PRE_LOADback to summary
public final EventListenerGroup<PreLoadEventListener> eventListenerGroup_PRE_LOAD
eventListenerGroup_PRE_UPDATEback to summary
public final EventListenerGroup<PreUpdateEventListener> eventListenerGroup_PRE_UPDATE
eventListenerGroup_REFRESHback to summary
public final EventListenerGroup<RefreshEventListener> eventListenerGroup_REFRESH
eventListenerGroup_REPLICATEback to summary
public final EventListenerGroup<ReplicateEventListener> eventListenerGroup_REPLICATE
eventListenerGroup_RESOLVE_NATURAL_IDback to summary
public final EventListenerGroup<ResolveNaturalIdEventListener> eventListenerGroup_RESOLVE_NATURAL_ID
eventListenerGroup_SAVEback to summary
public final EventListenerGroup<SaveOrUpdateEventListener> eventListenerGroup_SAVE
eventListenerGroup_SAVE_UPDATEback to summary
public final EventListenerGroup<SaveOrUpdateEventListener> eventListenerGroup_SAVE_UPDATE
eventListenerGroup_UPDATEback to summary
public final EventListenerGroup<SaveOrUpdateEventListener> eventListenerGroup_UPDATE
eventManagerback to summary
private final EventManager eventManager
initialSessionCacheModeback to summary
pack-priv final CacheMode initialSessionCacheMode
initialSessionFlushModeback to summary
pack-priv final FlushMode initialSessionFlushMode
isJtaTransactionAccessibleback to summary
pack-priv final boolean isJtaTransactionAccessible
jdbcServicesback to summary
public final JdbcServices jdbcServices
jdbcValuesMappingProducerProviderback to summary
private final JdbcValuesMappingProducerProvider jdbcValuesMappingProducerProvider
jsonFormatMapperback to summary
private final FormatMapper jsonFormatMapper
multiTenantConnectionProviderback to summary
pack-priv final MultiTenantConnectionProvider<Object> multiTenantConnectionProvider
mutationExecutorServiceback to summary
private final MutationExecutorService mutationExecutorService
parameterMarkerStrategyback to summary
public final ParameterMarkerStrategy parameterMarkerStrategy
preferredSqlTypeCodeForBooleanback to summary
pack-priv final int preferredSqlTypeCodeForBoolean
requiresMultiTenantConnectionProviderback to summary
pack-priv final boolean requiresMultiTenantConnectionProvider
transactionCoordinatorBuilderback to summary
pack-priv final TransactionCoordinatorBuilder transactionCoordinatorBuilder
useStreamForLobBindingback to summary
pack-priv final boolean useStreamForLobBinding
xmlFormatMapperback to summary
private final FormatMapper xmlFormatMapper

Constructor Detail

FastSessionServicesback to summary
pack-priv FastSessionServices(SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

determineCacheRetrieveModeback to summary
private static CacheRetrieveMode determineCacheRetrieveMode(Map<String, Object> settings)
determineCacheStoreModeback to summary
private static CacheStoreMode determineCacheStoreMode(Map<String, Object> settings)
firePostLoadEventback to summary
public void firePostLoadEvent(final PostLoadEvent postLoadEvent)
getCacheRetrieveModeback to summary
pack-priv CacheRetrieveMode getCacheRetrieveMode(Map<String, Object> properties)
Parameters
properties:Map<String, Object>

the Session properties

Returns:CacheRetrieveMode

either the CacheRetrieveMode as defined in the Session specific properties, or as defined in the properties shared across all sessions (the defaults).

getCacheStoreModeback to summary
pack-priv CacheStoreMode getCacheStoreMode(final Map<String, Object> properties)
Parameters
properties:Map<String, Object>

the Session properties

Returns:CacheStoreMode

either the CacheStoreMode as defined in the Session specific properties, or as defined in the properties shared across all sessions (the defaults).

getDefaultJdbcObserverback to summary
public ConnectionObserverStatsBridge getDefaultJdbcObserver()
getDefaultTimeZoneStorageStrategyback to summary
public TimeZoneStorageStrategy getDefaultTimeZoneStorageStrategy()
getEventManagerback to summary
public EventManager getEventManager()
getJdbcValuesMappingProducerProviderback to summary
public JdbcValuesMappingProducerProvider getJdbcValuesMappingProducerProvider()
getJsonFormatMapperback to summary
public FormatMapper getJsonFormatMapper()
getMutationExecutorServiceback to summary
public MutationExecutorService getMutationExecutorService()

Deprecated

Annotations
@Deprecated
getPreferredSqlTypeCodeForBooleanback to summary
public int getPreferredSqlTypeCodeForBoolean()
getXmlFormatMapperback to summary
public FormatMapper getXmlFormatMapper()
initializeDefaultFlushModeback to summary
private static FlushMode initializeDefaultFlushMode(Map<String, Object> defaultSessionProperties)
initializeDefaultLockOptionsback to summary
private static LockOptions initializeDefaultLockOptions(final Map<String, Object> defaultSessionProperties)
initializeDefaultSessionPropertiesback to summary
private static Map<String, Object> initializeDefaultSessionProperties(SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

isTransactionAccessibleback to summary
private static boolean isTransactionAccessible(SessionFactoryImplementor factory, TransactionCoordinatorBuilder transactionCoordinatorBuilder)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

listenersback to summary
private static <T> EventListenerGroup<T> listeners(EventListenerRegistry elr, EventType<T> type)
useStreamForLobBindingback to summary
public boolean useStreamForLobBinding()