Top Description Fields Constructors Methods
org.hibernate.internal

public final Class FastSessionServices

extends Object
Class Inheritance
Imports
java.util.Collections, .HashMap, .Map, .Objects, javax.persistence.CacheRetrieveMode, .CacheStoreMode, .PessimisticLockScope, org.hibernate.CacheMode, .FlushMode, .LockOptions, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.cfg.AvailableSettings, .BaselineSessionEventsListenerBuilder, .Environment, org.hibernate.dialect.Dialect, org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, .MultiTenantConnectionProvider, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.event.service.spi.EventListenerGroup, .EventListenerRegistry, org.hibernate.event.spi.AutoFlushEventListener, .ClearEventListener, .DeleteEventListener, .DirtyCheckEventListener, .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.hql.spi.QueryTranslatorFactory, org.hibernate.internal.log.DeprecationLogger, org.hibernate.internal.util.NullnessHelper, org.hibernate.jpa.QueryHints, org.hibernate.jpa.internal.util.CacheModeHelper, .ConfigurationHelper, .LockOptionsHelper, org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.type.descriptor.sql.SqlTypeDescriptor

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, and shared across Session instances. Assumes to be 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
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

public final Dialect
pack-priv final boolean
pack-priv final boolean
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>
pack-priv final CacheMode
pack-priv final FlushMode
pack-priv final boolean
pack-priv final JdbcServices
pack-priv final MultiTenantConnectionProvider
public final QueryTranslatorFactory
pack-priv final boolean
pack-priv final TransactionCoordinatorBuilder
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
FastSessionServices(SessionFactoryImpl sf)

Deprecated as a consequence of SessionFactoryImpl 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
private static FlushMode
initializeDefaultFlushMode(Map<String, Object> defaultSessionProperties)

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

private static Map<String, Object>
initializeDefaultSessionProperties(SessionFactoryImpl sf)

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

Deprecated as a consequence of SessionFactoryImpl being deprecated.
private static <T> EventListenerGroup<T>
pack-priv SqlTypeDescriptor
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

dialectback to summary
public final Dialect dialect
disallowOutOfTransactionUpdateOperationsback to summary
pack-priv final boolean disallowOutOfTransactionUpdateOperations
discardOnCloseback to summary
pack-priv final boolean discardOnClose
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
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
pack-priv final JdbcServices jdbcServices
multiTenantConnectionProviderback to summary
pack-priv final MultiTenantConnectionProvider multiTenantConnectionProvider
queryTranslatorFactoryback to summary
public final QueryTranslatorFactory queryTranslatorFactory
requiresMultiTenantConnectionProviderback to summary
pack-priv final boolean requiresMultiTenantConnectionProvider
transactionCoordinatorBuilderback to summary
pack-priv final TransactionCoordinatorBuilder transactionCoordinatorBuilder
useStreamForLobBindingback to summary
pack-priv final boolean useStreamForLobBinding

Constructor Detail

FastSessionServicesback to summary
pack-priv FastSessionServices(SessionFactoryImpl sf)

Deprecated

as a consequence of SessionFactoryImpl 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()
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(SessionFactoryImpl sf)

Deprecated

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

isTransactionAccessibleback to summary
private static boolean isTransactionAccessible(SessionFactoryImpl sf, TransactionCoordinatorBuilder transactionCoordinatorBuilder)

Deprecated

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

listenersback to summary
private static <T> EventListenerGroup<T> listeners(EventListenerRegistry elr, EventType<T> type)
remapSqlTypeDescriptorback to summary
pack-priv SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)