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

Defines a referenced object that can be accessed on a multi-phase level. More...

Inheritance diagram for Deveel.Data.Store.ILargeObject:
Deveel.Data.Store.ObjectStore.LargeObject

Public Member Functions

int Read (long offset, byte[] buffer, int length)
 Reads the content of the object, starting at a given offset, into the buffer given, for the number of bytes specified. More...
 
void Write (long offset, byte[] buffer, int length)
 Write the given binary content into the object, starting at the given offset for the number of bytes specified. More...
 
void Complete ()
 Marks the object as complete. More...
 
void Establish ()
 Establishes a reference of the object to the underlying store which contains it. More...
 
bool Release ()
 Removes a reference of the object from the underlying store which contains it. More...
 

Properties

ObjectId Id [get]
 Gets the unique identifier of the object within the system. More...
 
long RawSize [get]
 Gets the raw byte size of the object. More...
 
bool IsCompressed [get]
 Gets a value indicating whether the object is compressed. More...
 
bool IsComplete [get]
 Gets a value indicating if the object is in its complete state, that means it cannot be written further, but it can only be read. More...
 

Detailed Description

Defines a referenced object that can be accessed on a multi-phase level.

Implementations of this interface are large objects established in specialized data stores, which value is not retrieved immediately.

A large object is uniquely referenced using the Id value that is obtaining when establishing the object in a store.

Definition at line 35 of file ILargeObject.cs.

Member Function Documentation

void Deveel.Data.Store.ILargeObject.Complete ( )

Marks the object as complete.

After this method is invoked, the object is marked as complete and it cannot be written further.

Any call to Read before this method is called will throw an exception.

See also
IsComplete, Read, Write

Implemented in Deveel.Data.Store.ObjectStore.LargeObject.

void Deveel.Data.Store.ILargeObject.Establish ( )

Establishes a reference of the object to the underlying store which contains it.

A single object can be referenced multiple times within a store, and this prevents it to be removed from the store if it is still in use within the system.

See also
Release

Implemented in Deveel.Data.Store.ObjectStore.LargeObject.

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

Reads the content of the object, starting at a given offset, into the buffer given, for the number of bytes specified.

Parameters
offsetThe zero-based offset within the object at which to start reading the contents.
bufferThe array in which to write the contents read.
lengthThe desired number of bytes to read from the object contents.
Returns
Returns the actual number of bytes read from the object.

Implemented in Deveel.Data.Store.ObjectStore.LargeObject.

bool Deveel.Data.Store.ILargeObject.Release ( )

Removes a reference of the object from the underlying store which contains it.

The act of removing a reference of an object from the containing store does not automatically destroys it: in fact, this happens only if all references established for the object have been released.

Returns
Returns true if the object was removed from the store at its release, or false if it was retained.
See also
Establish

Implemented in Deveel.Data.Store.ObjectStore.LargeObject.

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

Write the given binary content into the object, starting at the given offset for the number of bytes specified.

Parameters
offsetThe zero-based starting offset at which to start to write the specified contents.
bufferThe content to write to the underlying object.
lengthThe number of bytes from the given buffer to write into the object.

Implemented in Deveel.Data.Store.ObjectStore.LargeObject.

Property Documentation

ObjectId Deveel.Data.Store.ILargeObject.Id
get

Gets the unique identifier of the object within the system.

Definition at line 39 of file ILargeObject.cs.

bool Deveel.Data.Store.ILargeObject.IsComplete
get

Gets a value indicating if the object is in its complete state, that means it cannot be written further, but it can only be read.

See also
Complete

Definition at line 69 of file ILargeObject.cs.

bool Deveel.Data.Store.ILargeObject.IsCompressed
get

Gets a value indicating whether the object is compressed.

Definition at line 61 of file ILargeObject.cs.

long Deveel.Data.Store.ILargeObject.RawSize
get

Gets the raw byte size of the object.

Large objects are pre-allocated in stores, that means this value represents the maximum size of the object, defined at creation.

The returned value of this property is also variable by the kind of compression applied to the store (if IsCompressed is true).

Definition at line 56 of file ILargeObject.cs.


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