public final class PersistentEventList extends PersistentList implements EventList, ListEventListener
EventList
. Underlying
collection implementation is BasicEventList
.Modifier and Type | Field and Description |
---|---|
protected ListEventAssembler |
updates
the change event and notification system
|
Constructor and Description |
---|
PersistentEventList(SessionImplementor session,
EventList newList)
Constructor with session and EventList.
|
PersistentEventList(SessionImplementor session,
EventListFactory listFactory)
Constructor with session.
|
Modifier and Type | Method and Description |
---|---|
void |
addListEventListener(ListEventListener listChangeListener)
Registers the specified listener to receive change updates for this list.
|
void |
beforeInitialize(CollectionPersister persister)
Kept for compatibility with older Hibernate versions.
|
void |
beforeInitialize(CollectionPersister persister,
int anticipatedSize) |
void |
dispose()
Disposing an EventList will make it eligible for garbage collection.
|
ListEventPublisher |
getPublisher()
Get the publisher used to distribute
ListEvent s. |
ReadWriteLock |
getReadWriteLock()
Gets the lock required to share this list between multiple threads.
|
void |
listChanged(ListEvent listChanges)
When the underlying list changes, this notification allows the
object to repaint itself or update itself as necessary.
|
void |
removeListEventListener(ListEventListener listChangeListener)
Removes the specified listener from receiving change updates for this list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
protected transient ListEventAssembler updates
public PersistentEventList(SessionImplementor session, EventListFactory listFactory)
session
- the sessionlistFactory
- factory for EventListspublic PersistentEventList(SessionImplementor session, EventList newList)
session
- the sessionnewList
- the EventListpublic void beforeInitialize(CollectionPersister persister)
public void beforeInitialize(CollectionPersister persister, int anticipatedSize)
public ListEventPublisher getPublisher()
ListEvent
s. It's always defined.getPublisher
in interface EventList
public ReadWriteLock getReadWriteLock()
getReadWriteLock
in interface EventList
ReadWriteLock
that guarantees thread safe
access to this list.public void addListEventListener(ListEventListener listChangeListener)
addListEventListener
in interface EventList
listChangeListener
- event listener != nullpublic void removeListEventListener(ListEventListener listChangeListener)
removeListEventListener
in interface EventList
listChangeListener
- event listener != nullpublic void listChanged(ListEvent listChanges)
It is mandatory that the calling thread has obtained the write lock on the source list. This is because the calling thread will have written to the source list to cause this event. This condition guarantees that no writes can occur while the listener is handling this event. It is an error to write to the source list while processing an event.
listChanged
in interface ListEventListener
listChanges
- a ListEvent
describing the changes to the listpublic void dispose()
Warning: It is an error
to call any method on an EventList
after it has been disposed.
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2016-06-08 1:09