| com.quadcap.sql.file.SegmentManager
All known Subclasses: com.quadcap.sql.file.BlockFile,
SegmentManager | public interface SegmentManager (Code) | | Interface to be implemented by segment allocators
author: Stan Bailes |
freeSegment | public void freeSegment(long seg) throws IOException(Code) | | Destroy the stream with the specified root segment and free up the
7 * storage it was using.
Parameters: segment - the root segment of the region exception: IOException - if the segment number isn't valid, or if anothererror is detected trying to access the region. |
getBytes | public byte[] getBytes(long seg) throws IOException(Code) | | Return the segment as a byte array
Parameters: seg - the segment id the value of the segment's bytes |
getInputStream | public RandomAccessInputStream getInputStream(long seg) throws IOException(Code) | | Return a new input stream, reading from the region with the specified
root segment.
Parameters: segment - the root segment of the region an InputStream bound to the region. exception: IOException - if the segment number isn't valid, or if anothererror is detected trying to access the region. |
getOutputStream | public RandomAccessOutputStream getOutputStream(long seg) throws IOException(Code) | | Return a new output stream, writing to the region with the specified
root segment.
Parameters: segment - the root segment of the region an OutputStream bound to the region. exception: IOException - if the segment number isn't valid, or if anothererror is detected trying to access the region. |
putBytes | public long putBytes(byte[] buf) throws IOException(Code) | | Create a new segment with the specified bytes value and return
its reference
Parameters: buf - the value to write to the new segment the segment id |
updateBytes | public void updateBytes(long seg, byte[] buf) throws IOException(Code) | | Update a segment with new value bytes.
Parameters: buf - the value to write to the segment Parameters: seg - the segment id |
|
|