|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectseda.sandStorm.core.SimpleSink
seda.sandStorm.lib.aDisk.AFileImpl
seda.sandStorm.lib.aDisk.AFileTPImpl
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.
AFile
Field Summary | |
(package private) java.io.RandomAccessFile |
raf
|
Constructor Summary | |
(package private) |
AFileTPImpl(AFile afile,
java.lang.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 | |
void |
close()
Close the file after all enqueued requests have completed. |
boolean |
enqueue_lossy(QueueElementIF req)
Enqueues the given request (which must be an AFileRequest) to the file. |
void |
enqueue_many(QueueElementIF[] elements)
Enqueues the given requests (which must be AFileRequests) to the file. |
void |
enqueue(QueueElementIF req)
Enqueues the given request (which must be an AFileRequest) to the file. |
void |
flush()
Causes a SinkFlushedEvent to be posted on the file's completion queue when all pending requests have completed. |
(package private) QueueIF |
getQueue()
Return the per-file event queue. |
(package private) AFileStat |
stat()
Return information on the properties of the file. |
Methods inherited from class seda.sandStorm.core.SimpleSink |
enqueue_abort, enqueue_commit, enqueue_prepare, getEnqueuePredicate, profileSize, setEnqueuePredicate, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.io.RandomAccessFile raf
Constructor Detail |
AFileTPImpl(AFile afile, java.lang.String fname, SinkIF compQ, boolean create, boolean readOnly, AFileTPTM tm) throws java.io.IOException
Method Detail |
public void enqueue(QueueElementIF req) throws SinkException
enqueue
in interface SinkIF
enqueue
in class AFileImpl
SinkException
public boolean enqueue_lossy(QueueElementIF req)
enqueue_lossy
in interface SinkIF
enqueue_lossy
in class AFileImpl
public void enqueue_many(QueueElementIF[] elements) throws SinkException
enqueue_many
in interface SinkIF
enqueue_many
in class AFileImpl
SinkException
AFileStat stat()
stat
in class AFileImpl
public void close()
close
in class AFileImpl
public void flush()
flush
in class AFileImpl
QueueIF getQueue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |