DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Store.IStoreData Interface Reference

An interface for low level store data access methods. More...

Inheritance diagram for Deveel.Data.Store.IStoreData:
Deveel.Data.Store.FileStoreData Deveel.Data.Store.ScatteringFileStoreData

Public Member Functions

bool Delete ()
 Deletes the data block. More...
 
void Open (bool readOnly)
 Opens the data block and make it ready to be accessed. More...
 
void Close ()
 Closes the block and make it unavailable. More...
 
int Read (long position, byte[] buffer, int offset, int length)
 Reads a given amount of data from the block, starting at the absolute position given and copying into the provided buffer. More...
 
void Write (long position, byte[] buffer, int offset, int length)
 Writes a given buffer into the block, starting at the absolute position given. More...
 
void Flush ()
 Flushes the data written in the temporary store of the block to the underlying medium. More...
 
void SetLength (long value)
 Sets the length of the data block. More...
 

Properties

bool Exists [get]
 Gets a value indicating whether the data block object exists. More...
 
long Length [get]
 Gets the current length of the data block. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the data block is in read-only mode. More...
 

Detailed Description

An interface for low level store data access methods.

Definition at line 23 of file IStoreData.cs.

Member Function Documentation

void Deveel.Data.Store.IStoreData.Close ( )

Closes the block and make it unavailable.

When IDisposable.Dispose is invoked this method is also called to prevent any operation before disposal.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

bool Deveel.Data.Store.IStoreData.Delete ( )

Deletes the data block.

Returns
Returns true if the block was successfully deleted, or false otherwise.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

void Deveel.Data.Store.IStoreData.Flush ( )

Flushes the data written in the temporary store of the block to the underlying medium.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

void Deveel.Data.Store.IStoreData.Open ( bool  readOnly)

Opens the data block and make it ready to be accessed.

Parameters
readOnlyIndicates if the block must be open in read-only mode.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

int Deveel.Data.Store.IStoreData.Read ( long  position,
byte[]  buffer,
int  offset,
int  length 
)

Reads a given amount of data from the block, starting at the absolute position given and copying into the provided buffer.

Parameters
positionThe absolute position within the data block from where to start reading.
bufferThe destination buffer where the data read will be filled in.
offsetThe starting offset within the buffer where to start copying the data read.
lengthThe desired number of bytes to read from the data block.
Returns
Returns the actual number of bytes read from the data block or 0 if the end of the block was reached.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

void Deveel.Data.Store.IStoreData.SetLength ( long  value)

Sets the length of the data block.

Parameters
valueThe new size to set for the data block.

If the value is less than Length this method will shrink the data block and trim the exceeding contents. If the value is more than Length then it is responsibility of the implementation of this contract to increase the contents.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

void Deveel.Data.Store.IStoreData.Write ( long  position,
byte[]  buffer,
int  offset,
int  length 
)

Writes a given buffer into the block, starting at the absolute position given.

Parameters
positionThe absolute position within the data block from where to start writing.
bufferThe data to write into the block.
offsetThe starting offset within the buffer where to start writing data from.
lengthThe number of bytes to write into the data block.

Implemented in Deveel.Data.Store.ScatteringFileStoreData, and Deveel.Data.Store.FileStoreData.

Property Documentation

bool Deveel.Data.Store.IStoreData.Exists
get

Gets a value indicating whether the data block object exists.

The existence of this object is relative to the kind of store the data block belongs to.

Definition at line 31 of file IStoreData.cs.

bool Deveel.Data.Store.IStoreData.IsReadOnly
get

Gets a value indicating whether the data block is in read-only mode.

When a block is read-only any call to Write will throw an exception.

Definition at line 45 of file IStoreData.cs.

long Deveel.Data.Store.IStoreData.Length
get

Gets the current length of the data block.

Definition at line 36 of file IStoreData.cs.


The documentation for this interface was generated from the following file: