Seva Software

 

What is Aruna DB?

Last Updated: 9/25/2001

A_Pos

Purpose

License

Description

Dependencies

Limitations

Performance Considerations

To Do

Usage

Class Methods

Instance Methods

Testing

A_Debug Usage

 

Purpose:

This is returned and used by A_FileStore. This the file position of an object in a file store. This consists of a file number from 0-255 and a 4 byte (native unsigned int) file position in a file in the this store. This contains the information needed by A_FileStore to retrieve an object from a file store. This class can be found in a_buffer.c.

 

Description:

A_Pos is a 1 byte file_no (0-255) and a 4 byte (native unsigned int) file position in this file_no. File_no is an internal file counter used by A_FileStore to determine which file in the file store is being referenced. This is NOT the C or internal file_no generally associated with C files. This class was written in C for performance reasons. It is located in a_buffer.c. A_filestore.rb contains several additional methods for this class to support Marshal.dump/load.

 

Dependencies:

 

Limitations:

  • It can reference up to 256 files
  • It can reference up to a 4 byte (native unsigned int) value in the file. The actual file position is calculated by the following equation pos * A_FileStore.block_size.

 

Performance Considerations:

 

To Do:

 

 Usage:

N/A

 

Class Methods:

A_Pos.new(file_no, pos)

Creates a new object.

 

Instance Methods:

file_no()

Returns the file_no for this object.

pos()

Returns the pos for this object.

file_no=(new_file_no)

Sets the file_no for this object.

pos=(new_pos)

Sets the pos for this object.

 

Testing: 

None.

 

A_Debug Usage:

None.