Quadcap Embeddable Database

com.quadcap.sql.file.NullStore Class Reference

Inheritance diagram for com.quadcap.sql.file.NullStore:

com.quadcap.sql.file.BlockStore List of all members.

Detailed Description

The null store, which is part of the memory-only implementation.

Author:
Stan Bailes

Definition at line 60 of file NullStore.java.

Public Member Functions

 NullStore ()
void init (File file, String mode, int blockSize, Object lock) throws IOException
 Initialize a new BlockStore object using the specified file and blocksize.

void read (long blockNum, byte[] buf, int off) throws IOException
 Read a block into a buffer.

void write (long blockNum, byte[] buf) throws IOException
 Write a block from a buffer into the file.

void restore (long blockNum, byte[] buf, int off) throws IOException
 Restore a block image.

void setLength (long length) throws IOException
boolean isEncrypted ()
void close () throws IOException
void flush () throws IOException


Constructor & Destructor Documentation

com.quadcap.sql.file.NullStore.NullStore  ) 
 

Definition at line 62 of file NullStore.java.


Member Function Documentation

void com.quadcap.sql.file.NullStore.close  )  throws IOException
 

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 120 of file NullStore.java.

void com.quadcap.sql.file.NullStore.flush  )  throws IOException
 

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 123 of file NullStore.java.

void com.quadcap.sql.file.NullStore.init File  file,
String  mode,
int  blockSize,
Object  lock
throws IOException
 

Initialize a new BlockStore object using the specified file and blocksize.

Parameters:
file the underlying file.
mode "r" for readonly access, otherwise "rw"
blocksize the block size to use when creating the file.
the synchronization object

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 73 of file NullStore.java.

References com.quadcap.sql.file.NullStore.init().

Referenced by com.quadcap.sql.file.NullStore.init().

boolean com.quadcap.sql.file.NullStore.isEncrypted  ) 
 

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 116 of file NullStore.java.

void com.quadcap.sql.file.NullStore.read long  blockNum,
byte[]  buf,
int  off
throws IOException
 

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.
buf the buffer into which the data is read.

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 85 of file NullStore.java.

References com.quadcap.sql.file.NullStore.read().

Referenced by com.quadcap.sql.file.NullStore.read().

void com.quadcap.sql.file.NullStore.restore long  blockNum,
byte[]  buf,
int  off
throws IOException
 

Restore a block image.

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 107 of file NullStore.java.

References com.quadcap.sql.file.NullStore.restore().

Referenced by com.quadcap.sql.file.NullStore.restore().

void com.quadcap.sql.file.NullStore.setLength long  length  )  throws IOException
 

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 113 of file NullStore.java.

References com.quadcap.sql.file.NullStore.setLength().

Referenced by com.quadcap.sql.file.NullStore.setLength().

void com.quadcap.sql.file.NullStore.write long  blockNum,
byte[]  buf
throws IOException
 

Write a block from a buffer into the file.

Parameters:
blockNum the number of the block to write.
buf the buffer from which the data is written.
Exceptions:
IOException if an I/O error occurs.

Reimplemented from com.quadcap.sql.file.BlockStore.

Definition at line 98 of file NullStore.java.

References com.quadcap.sql.file.NullStore.write().

Referenced by com.quadcap.sql.file.NullStore.write().