| threaddemo.model.Phadhail
All known Subclasses: threaddemo.model.SwungPhadhail, threaddemo.model.AbstractPhadhail, threaddemo.model.BufferedPhadhail,
Phadhail | public interface Phadhail (Code) | | Really, a file.
Mutator methods (rename, delete, create*Phadhail) cannot be called
from within a listener callback, or generally without read access.
You *can* add/remove listeners from within a listener callback however,
or in fact at any other time (without even a lock).
Methods from java.lang.Object (toString, hashCode, equals) can be called at any time.
author: Jesse Glick |
delete | void delete() throws IOException(Code) | | delete this phadhail (must not have children)
|
getChildren | List<Phadhail> getChildren()(Code) | | Get a list of child files.
caller cannot mutate list, and it might not be thread-safe
implementor cannot change list after creation (i.e. size & identity of elements)
it is expected that once the list is obtained, asking for elements is fast and nonblocking
(and then the read lock is not required)
|
hasChildren | boolean hasChildren()(Code) | | will be true if a directory
|
lock | RWLock lock()(Code) | | Get a lock appropriate for locking operations from another thread.
Should be a single lock for a whole tree of phadhails.
Model methods should automatically acquire the relevant lock for you;
the view need not bother, unless it needs to do an atomic operation.
|
|
|