| java.lang.Object seda.sandStorm.core.SimpleSink seda.sandStorm.lib.aDisk.AFileImpl seda.sandStorm.lib.aDisk.AFileTPImpl
AFileTPImpl | class AFileTPImpl extends AFileImpl implements QueueElementIF(Code) | | This is an implementation of AFile which uses a pool of threads
which perform blocking I/O (through the java.io.RandomAccessFile
class) on files. This is a portable implementation but is not
intended to be high-performance.
author: Matt Welsh See Also: AFile |
Constructor Summary | |
| AFileTPImpl(AFile afile, String fname, SinkIF compQ, boolean create, boolean readOnly, AFileTPTM tm) Create an AFileTPIMpl with the given AFile, filename, completion
queue, create/readOnly flags, and Thread Manager. |
Method Summary | |
public void | close() Close the file after all enqueued requests have completed. | public void | enqueue(QueueElementIF req) Enqueues the given request (which must be an AFileRequest)
to the file. | public boolean | enqueue_lossy(QueueElementIF req) Enqueues the given request (which must be an AFileRequest)
to the file. | public void | enqueue_many(QueueElementIF[] elements) Enqueues the given requests (which must be AFileRequests)
to the file. | public void | flush() Causes a SinkFlushedEvent to be posted on the file's completion queue
when all pending requests have completed. | QueueIF | getQueue() Return the per-file event queue. | AFileStat | stat() Return information on the properties of the file. |
AFileTPImpl | AFileTPImpl(AFile afile, String fname, SinkIF compQ, boolean create, boolean readOnly, AFileTPTM tm) throws IOException(Code) | | Create an AFileTPIMpl with the given AFile, filename, completion
queue, create/readOnly flags, and Thread Manager.
|
close | public void close()(Code) | | Close the file after all enqueued requests have completed.
Disallows any additional requests to be enqueued on this file.
A SinkClosedEvent will be posted on the file's completion queue
when the close is complete.
|
enqueue_lossy | public boolean enqueue_lossy(QueueElementIF req)(Code) | | Enqueues the given request (which must be an AFileRequest)
to the file.
|
flush | public void flush()(Code) | | Causes a SinkFlushedEvent to be posted on the file's completion queue
when all pending requests have completed.
|
getQueue | QueueIF getQueue()(Code) | | Return the per-file event queue.
|
stat | AFileStat stat()(Code) | | Return information on the properties of the file.
|
|
|