E - Intersection type describing Executable implementationspublic class ExecutableList<E extends Executable & java.lang.Comparable & java.io.Serializable>
extends java.lang.Object
implements java.io.Serializable, java.lang.Iterable<E>, java.io.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) |
java.util.Set<java.io.Serializable> |
getQuerySpaces()
Lazily constructs the querySpaces affected by the actions in the list.
|
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator()
Returns an iterator for the list.
|
void |
readExternal(java.io.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.
|
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput oos)
Write this list out to the given stream as part of serialization
|
public 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 java.util.Set<java.io.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 java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E extends Executable & java.lang.Comparable & java.io.Serializable>public void writeExternal(java.io.ObjectOutput oos)
throws java.io.IOException
writeExternal in interface java.io.Externalizableoos - The stream to which to serialize our statejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The stream from which to read our serial statejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void afterDeserialize(SessionImplementor session)
session - The session to which to associate the Executablespublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.