| java.lang.Object com.quadcap.sql.file.BlockStore com.quadcap.sql.file.MemoryBlockStore
MemoryBlockStore | public class MemoryBlockStore extends BlockStore (Code) | | Below the cache, this class handles the actual I/O to the underlying file.
Block write operations are logged by this class.
author: Stan Bailes |
MemoryBlockStore | public MemoryBlockStore()(Code) | | |
init | public void init(File file, String mode, int blockSize, Object lock) throws IOException(Code) | | Initialize a new BlockStore object using the specified file and
blocksize.
Parameters: file - the underlying file. Parameters: mode - "r" for readonly access, otherwise "rw" Parameters: blocksize - the block size to use when creating the file. Parameters: the - synchronization object |
isEncrypted | public boolean isEncrypted()(Code) | | |
read | public void read(long blockNum, byte[] buf, int off) throws IOException(Code) | | Read a block into a buffer. If the specified block is beyond the
current end of file, then grow the file
Parameters: blockNum - the number of the block to read. Parameters: buf - the buffer into which the data is read. |
restore | public void restore(long blockNum, byte[] buf, int off) throws IOException(Code) | | Restore a block image
|
write | public void write(long blockNum, byte[] buf) throws IOException(Code) | | Write a block from a buffer into the file.
Parameters: blockNum - the number of the block to write. Parameters: buf - the buffer from which the data is written. exception: IOException - if an I/O error occurs. |
Methods inherited from com.quadcap.sql.file.BlockStore | public int blockSize()(Code)(Java Doc) public void clearModified() throws IOException(Code)(Java Doc) public void close() throws IOException(Code)(Java Doc) public void flush() throws IOException(Code)(Java Doc) public File getFile()(Code)(Java Doc) public Log getLog()(Code)(Java Doc) public String getName()(Code)(Java Doc) public void init(File file, String mode, int blockSize, Object lock) throws IOException(Code)(Java Doc) public boolean isEncrypted()(Code)(Java Doc) final protected byte[] newHeader(int blockSize, long lastBlock)(Code)(Java Doc) public void read(long blockNum, byte[] buf) throws IOException(Code)(Java Doc) public void read(long blockNum, byte[] buf, int off) throws IOException(Code)(Java Doc) public void restore(long blockNum, byte[] buf, int off) throws IOException(Code)(Java Doc) public static String rw()(Code)(Java Doc) public void setKey(com.quadcap.crypto.SymmetricKey key) throws IOException(Code)(Java Doc) public void setLength(long length) throws IOException(Code)(Java Doc) public void setLog(Log log)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void write(long blockNum, byte[] buf) throws IOException(Code)(Java Doc)
|
|
|