E - Intersection type describing Executable implementationspublic class ExecutableList<E extends Executable & Comparable & Serializable> extends Object implements Serializable, Iterable<E>, Externalizable
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExecutableList.Sorter<E extends Executable>
Provides a sorting interface for ExecutableList.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
INIT_QUEUE_LIST_SIZE |
| Constructor and Description |
|---|
ExecutableList()
Creates a new ExecutableList with the default settings.
|
ExecutableList(boolean requiresSorting) |
ExecutableList(ExecutableList.Sorter<E> sorter)
Creates a new ExecutableList using the specified Sorter.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E executable)
Add an Executable to this list.
|
void |
afterDeserialize(SessionImplementor session)
Allow the Executables to re-associate themselves with the Session after deserialization.
|
void |
clear()
Clears the list of executions.
|
E |
get(int index) |
Set<Serializable> |
getQuerySpaces()
Lazily constructs the querySpaces affected by the actions in the list.
|
boolean |
isEmpty() |
Iterator<E> |
iterator()
Returns an iterator for the list.
|
void |
readExternal(ObjectInput in)
Read this object state back in from the given stream as part of de-serialization
|
E |
remove(int index)
Removes the entry at position index in the list.
|
void |
removeLastN(int n)
Removes the last n entries from the list.
|
int |
size() |
void |
sort()
Sorts the list using the natural ordering or using the Sorter if it's not null.
|
String |
toString() |
void |
writeExternal(ObjectOutput oos)
Write this list out to the given stream as part of serialization
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final int INIT_QUEUE_LIST_SIZE
public ExecutableList()
public ExecutableList(int initialCapacity)
initialCapacity - The initial capacity for instantiating the internal Listpublic ExecutableList(boolean requiresSorting)
public ExecutableList(int initialCapacity,
boolean requiresSorting)
public ExecutableList(ExecutableList.Sorter<E> sorter)
sorter - The Sorter to use; may be nullpublic ExecutableList(int initialCapacity,
ExecutableList.Sorter<E> sorter)
initialCapacity - The initial capacity for instantiating the internal Listsorter - The Sorter to use; may be nullpublic Set<Serializable> getQuerySpaces()
public boolean isEmpty()
public E remove(int index)
index - The index of the element to removepublic void clear()
public void removeLastN(int n)
n - The number of elements to remove.public boolean add(E executable)
executable - the executable to add to the listpublic void sort()
public int size()
public E get(int index)
index - The index of the element to retrievepublic Iterator<E> iterator()
iterator in interface Iterable<E extends Executable & Comparable & Serializable>public void writeExternal(ObjectOutput oos) throws IOException
writeExternal in interface Externalizableoos - The stream to which to serialize our stateIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface Externalizablein - The stream from which to read our serial stateIOExceptionClassNotFoundExceptionpublic void afterDeserialize(SessionImplementor session)
session - The session to which to associate the ExecutablesCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.