public final class FileList extends TransformedList
EventList that is persisted to disk.
Warning: This class is a technology preview and is subject to API changes.
| EventList Overview | |
| Writable: | yes |
| Concurrency: | Requires ReadWriteLock for every access, even for single-threaded use |
| Performance: | N/A |
| Memory: | O(N) |
| Unit Tests: | N/A |
| Issues: | N/A |
sourcepublisher, readWriteLock, updates| Constructor and Description |
|---|
FileList(java.io.File file,
ByteCoder byteCoder)
Create a
FileList that stores its data in the specified file. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this FileList so that it consumes no disc resources.
|
void |
dispose()
Releases the resources consumed by this
TransformedList so that it
may eventually be garbage collected. |
boolean |
isWritable()
Gets whether the source
EventList is writable via this API. |
void |
listChanged(ListEvent listChanges)
When the underlying list changes, this notification allows the
object to repaint itself or update itself as necessary.
|
add, addAll, clear, get, getSourceIndex, remove, removeAll, retainAll, set, sizeadd, addAll, addListEventListener, contains, containsAll, equals, getPublisher, getReadWriteLock, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeListEventListener, subList, toArray, toArray, toStringpublic boolean isWritable()
EventList is writable via this API.
Extending classes must override this method in order to make themselves writable.
isWritable in class TransformedListpublic 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 ListEventListenerlistChanged in class TransformedListlistChanges - a ListEvent describing the changes to the listpublic void close()
disposed.public void dispose()
TransformedList so that it
may eventually be garbage collected.
A TransformedList will be garbage collected without a call to
TransformedList.dispose(), but not before its source EventList is garbage
collected. By calling TransformedList.dispose(), you allow the TransformedList
to be garbage collected before its source EventList. This is
necessary for situations where a TransformedList is short-lived but
its source EventList is long-lived.
Warning: It is an error
to call any method on a TransformedList after it has been disposed.
dispose in interface EventListdispose in class TransformedListGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by buildd at 2016-02-14 5:12