mdw.sandStorm.lib.aDisk
Class AFileImpl
java.lang.Object
|
+--mdw.sandStorm.core.SimpleSink
|
+--mdw.sandStorm.lib.aDisk.AFileImpl
- All Implemented Interfaces:
- ProfilableIF, SinkIF
- Direct Known Subclasses:
- AFileTPImpl
- abstract class AFileImpl
- extends SimpleSink
Package-access only abstract class representing an implementation of
the AFile interface. By creating a subclass of AFileImpl and tying it
into the implementation-selection code in AFile, you can introduce new
implementations of AFile behind this interface.
- Author:
- Matt Welsh
- See Also:
AFile
Constructor Summary |
(package private) |
AFileImpl()
|
Method Summary |
abstract void |
close()
Close the file after all enqueued requests have completed. |
abstract boolean |
enqueue_lossy(QueueElementIF req)
Enqueues the given request (which must be an AFileRequest)
to the file. |
abstract void |
enqueue_many(QueueElementIF[] elements)
Enqueues the given requests (which must be AFileRequests)
to the file. |
abstract void |
enqueue(QueueElementIF req)
Enqueues the given request (which must be an AFileRequest)
to the file. |
abstract void |
flush()
Causes a SinkFlushedEvent to be posted on the file's completion queue
when all pending requests have completed. |
(package private) abstract AFileStat |
stat()
Return information on the properties of the file. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AFileImpl
AFileImpl()
enqueue
public abstract void enqueue(QueueElementIF req)
throws SinkException
- Enqueues the given request (which must be an AFileRequest)
to the file.
- Overrides:
enqueue
in class SimpleSink
- Following copied from interface:
mdw.sandStorm.api.SinkIF
- Parameters:
element
- The QueueElementIF
to enqueue- Throws:
SinkFullException
- Indicates that the sink is temporarily full.SinkClosedException
- Indicates that the sink is
no longer being serviced.
enqueue_lossy
public abstract boolean enqueue_lossy(QueueElementIF req)
- Enqueues the given request (which must be an AFileRequest)
to the file.
- Overrides:
enqueue_lossy
in class SimpleSink
- Following copied from interface:
mdw.sandStorm.api.SinkIF
- Parameters:
element
- The QueueElementIF
to enqueue- Returns:
- true if the element was enqueued, false otherwise.
enqueue_many
public abstract void enqueue_many(QueueElementIF[] elements)
throws SinkException
- Enqueues the given requests (which must be AFileRequests)
to the file.
- Overrides:
enqueue_many
in class SimpleSink
- Following copied from interface:
mdw.sandStorm.api.SinkIF
- Parameters:
elements
- The element array to enqueue- Throws:
SinkFullException
- Indicates that the sink is temporarily full.SinkClosedException
- Indicates that the sink is
no longer being serviced.
stat
abstract AFileStat stat()
- Return information on the properties of the file.
close
public abstract void close()
- 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.
flush
public abstract void flush()
- Causes a SinkFlushedEvent to be posted on the file's completion queue
when all pending requests have completed.