类 ExecutableList<E extends Executable & Comparable & Serializable>
- java.lang.Object
-
- org.hibernate.engine.spi.ExecutableList<E>
-
- 类型参数:
E- Intersection type describing Executable implementations
- 所有已实现的接口:
Externalizable,Serializable,Iterable<E>
public class ExecutableList<E extends Executable & Comparable & Serializable> extends Object implements Serializable, Iterable<E>, Externalizable
Specialized encapsulating of the state pertaining to each Executable list. Manages sorting the executables (lazily) Manages the querySpaces affected by the executables in the list, and caches this too.- 作者:
- Steve Ebersole, Anton Marsden
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceExecutableList.Sorter<E extends Executable>Provides a sorting interface for ExecutableList.
-
字段概要
字段 修饰符和类型 字段 说明 static intINIT_QUEUE_LIST_SIZE
-
构造器概要
构造器 构造器 说明 ExecutableList()Creates a new ExecutableList with the default settings.ExecutableList(boolean requiresSorting)ExecutableList(int initialCapacity)Creates a new ExecutableList with the specified initialCapacity.ExecutableList(int initialCapacity, boolean requiresSorting)ExecutableList(int initialCapacity, ExecutableList.Sorter<E> sorter)Creates a new ExecutableList with the specified initialCapacity and Sorter.ExecutableList(ExecutableList.Sorter<E> sorter)Creates a new ExecutableList using the specified Sorter.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanadd(E executable)Add an Executable to this list.voidafterDeserialize(SessionImplementor session)Allow the Executables to re-associate themselves with the Session after deserialization.voidclear()Clears the list of executions.Eget(int index)Set<Serializable>getQuerySpaces()Lazily constructs the querySpaces affected by the actions in the list.booleanisEmpty()Iterator<E>iterator()Returns an iterator for the list.voidreadExternal(ObjectInput in)Read this object state back in from the given stream as part of de-serializationEremove(int index)Removes the entry at position index in the list.voidremoveLastN(int n)Removes the last n entries from the list.intsize()voidsort()Sorts the list using the natural ordering or using the Sorter if it's not null.StringtoString()voidwriteExternal(ObjectOutput oos)Write this list out to the given stream as part of serialization-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
-
-
-
字段详细资料
-
INIT_QUEUE_LIST_SIZE
public static final int INIT_QUEUE_LIST_SIZE
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
ExecutableList
public ExecutableList()
Creates a new ExecutableList with the default settings.
-
ExecutableList
public ExecutableList(int initialCapacity)
Creates a new ExecutableList with the specified initialCapacity.- 参数:
initialCapacity- The initial capacity for instantiating the internal List
-
ExecutableList
public ExecutableList(boolean requiresSorting)
-
ExecutableList
public ExecutableList(int initialCapacity, boolean requiresSorting)
-
ExecutableList
public ExecutableList(ExecutableList.Sorter<E> sorter)
Creates a new ExecutableList using the specified Sorter.- 参数:
sorter- The Sorter to use; may benull
-
ExecutableList
public ExecutableList(int initialCapacity, ExecutableList.Sorter<E> sorter)Creates a new ExecutableList with the specified initialCapacity and Sorter.- 参数:
initialCapacity- The initial capacity for instantiating the internal Listsorter- The Sorter to use; may benull
-
-
方法详细资料
-
getQuerySpaces
public Set<Serializable> getQuerySpaces()
Lazily constructs the querySpaces affected by the actions in the list.- 返回:
- the querySpaces affected by the actions in this list
-
isEmpty
public boolean isEmpty()
- 返回:
- true if the list is empty.
-
remove
public E remove(int index)
Removes the entry at position index in the list.- 参数:
index- The index of the element to remove- 返回:
- the entry that was removed
-
clear
public void clear()
Clears the list of executions.
-
removeLastN
public void removeLastN(int n)
Removes the last n entries from the list.- 参数:
n- The number of elements to remove.
-
add
public boolean add(E executable)
Add an Executable to this list.- 参数:
executable- the executable to add to the list- 返回:
- true if the object was added to the list
-
sort
public void sort()
Sorts the list using the natural ordering or using the Sorter if it's not null.
-
size
public int size()
- 返回:
- the current size of the list
-
get
public E get(int index)
- 参数:
index- The index of the element to retrieve- 返回:
- The element at specified index
-
iterator
public Iterator<E> iterator()
Returns an iterator for the list. Wraps the list just in case something tries to modify it.- 指定者:
iterator在接口中Iterable<E extends Executable & Comparable & Serializable>- 返回:
- an unmodifiable iterator
-
writeExternal
public void writeExternal(ObjectOutput oos) throws IOException
Write this list out to the given stream as part of serialization- 指定者:
writeExternal在接口中Externalizable- 参数:
oos- The stream to which to serialize our state- 抛出:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
Read this object state back in from the given stream as part of de-serialization- 指定者:
readExternal在接口中Externalizable- 参数:
in- The stream from which to read our serial state- 抛出:
IOExceptionClassNotFoundException
-
afterDeserialize
public void afterDeserialize(SessionImplementor session)
Allow the Executables to re-associate themselves with the Session after deserialization.- 参数:
session- The session to which to associate the Executables
-
-