Top Description Inners Fields Constructors Methods
org.hibernate.loader.ast.internal

public Class MultiKeyLoadChunker<K>

extends Object
Class Inheritance
Imports
java.util.List, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.metamodel.mapping.Bindable, org.hibernate.sql.ast.tree.expression.JdbcParameter, org.hibernate.sql.ast.tree.select.SelectStatement, org.hibernate.sql.exec.internal.JdbcParameterBindingsImpl, org.hibernate.sql.exec.spi.ExecutionContext, .JdbcOperationQuerySelect, .JdbcParameterBindings, .JdbcParametersList, org.hibernate.sql.results.internal.RowTransformerStandardImpl, org.hibernate.sql.results.spi.ListResultsConsumer

When the number of ids to initialize exceeds a certain threshold, IN-predicate based multi-key loaders will break the initialization into "chunks".
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
pack-priv static interface
pack-priv static interface
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private final Bindable
private final int
private final JdbcParametersList
private final JdbcOperationQuerySelect
private final int
private final SelectStatement

Constructor Summary

AccessConstructor and Description
public
MultiKeyLoadChunker(int chunkSize, int keyColumnCount, Bindable bindable, JdbcParametersList jdbcParameters, SelectStatement sqlAst, JdbcOperationQuerySelect jdbcSelect)

Method Summary

Modifier and TypeMethod and Description
private void
public void
processChunks(K[]
The group of keys to be initialized
keys
,
int
The number of non-null values in keys, which will be less-than-or-equal-to the number of keys
nonNullElementCount
,
MultiKeyLoadChunker.SqlExecutionContextCreator sqlExecutionContextCreator, MultiKeyLoadChunker.KeyCollector<K>
Called for each key as it is processed
keyCollector
,
MultiKeyLoadChunker.ChunkStartListener
Notifications that processing a chunk has starting
startListener
,
MultiKeyLoadChunker.ChunkBoundaryListener
Notifications that processing a chunk has completed
boundaryListener
,
SharedSessionContractImplementor session)

Process the chunks

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindableback to summary
private final Bindable bindable
chunkSizeback to summary
private final int chunkSize
jdbcParametersback to summary
private final JdbcParametersList jdbcParameters
jdbcSelectback to summary
private final JdbcOperationQuerySelect jdbcSelect
keyColumnCountback to summary
private final int keyColumnCount
sqlAstback to summary
private final SelectStatement sqlAst

Constructor Detail

MultiKeyLoadChunkerback to summary
public MultiKeyLoadChunker(int chunkSize, int keyColumnCount, Bindable bindable, JdbcParametersList jdbcParameters, SelectStatement sqlAst, JdbcOperationQuerySelect jdbcSelect)

Method Detail

processChunkback to summary
private void processChunk(K[] keys, int startIndex, MultiKeyLoadChunker.SqlExecutionContextCreator sqlExecutionContextCreator, MultiKeyLoadChunker.KeyCollector<K> keyCollector, MultiKeyLoadChunker.ChunkStartListener startListener, MultiKeyLoadChunker.ChunkBoundaryListener boundaryListener, SharedSessionContractImplementor session)
processChunksback to summary
public void processChunks(K[] keys, int nonNullElementCount, MultiKeyLoadChunker.SqlExecutionContextCreator sqlExecutionContextCreator, MultiKeyLoadChunker.KeyCollector<K> keyCollector, MultiKeyLoadChunker.ChunkStartListener startListener, MultiKeyLoadChunker.ChunkBoundaryListener boundaryListener, SharedSessionContractImplementor session)

Process the chunks

Parameters
keys:K[]

The group of keys to be initialized

nonNullElementCount:int

The number of non-null values in keys, which will be less-than-or-equal-to the number of keys

keyCollector:MultiKeyLoadChunker.KeyCollector<K>

Called for each key as it is processed

startListener:MultiKeyLoadChunker.ChunkStartListener

Notifications that processing a chunk has starting

boundaryListener:MultiKeyLoadChunker.ChunkBoundaryListener

Notifications that processing a chunk has completed

org.hibernate.loader.ast.internal back to summary

pack-priv Interface MultiKeyLoadChunker.ChunkBoundaryListener

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
chunkBoundaryNotification(int startIndex, int nonNullElementCount)

Method Detail

chunkBoundaryNotificationback to summary
public void chunkBoundaryNotification(int startIndex, int nonNullElementCount)
org.hibernate.loader.ast.internal back to summary

pack-priv Interface MultiKeyLoadChunker.ChunkStartListener

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
chunkStartNotification(int startIndex)

Method Detail

chunkStartNotificationback to summary
public void chunkStartNotification(int startIndex)
org.hibernate.loader.ast.internal back to summary

pack-priv Interface MultiKeyLoadChunker.KeyCollector<K>

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
collect(K key, int relativePosition, int absolutePosition)

Method Detail

collectback to summary
public void collect(K key, int relativePosition, int absolutePosition)
org.hibernate.loader.ast.internal back to summary

pack-priv Interface MultiKeyLoadChunker.SqlExecutionContextCreator

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public ExecutionContext

Method Detail

createContextback to summary
public ExecutionContext createContext(JdbcParameterBindings parameterBindings, SharedSessionContractImplementor session)