db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: What does the RAFContainer.java class do: Derby-1958
Date Sat, 19 Jun 2010 16:36:49 GMT
On 06/18/2010 11:59 PM, Eranda Sooriyabandara wrote:
> Does any one know about the role of the RAFContainer.java?

It's one of the primary classes in the storage subsystem.

RAF stands for Random Access File.

The data in Derby tables are stored in files in your database directory;
when a file is being accessed, the storage subsystem uses the
RAFContainer to do the work.

The RAFContainer works with "pages", which are segments of data
in the file. We divide the total set of bytes in the file into
logical units that we call pages; we read and write data from
the file in units of pages.

So the readPage() and writePage() methods in RAFContainer are
particularly important and interesting to students of this class.

I think that DERBY-1958 is describing a problem in which the
RAFContainer class does not have a useful toString() method, so
that when it is passed as an argument to an error message, the
container information does not get displayed.

I believe that DERBY-1958 could be addressed by writing (and building
a test for) a toString() method on RAFContainer that provided some
basic identification information such as which file this container
is responsible for.

Probably, the toString() method could be located in the BaseContainer
class, and then RAFContainer would simply inherit it.

thanks,

bryan


Mime
View raw message