DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
Defines a referenced object that can be accessed on a multi-phase level. More...
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... | |
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.
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.
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.
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.
offset | The zero-based offset within the object at which to start reading the contents. |
buffer | The array in which to write the contents read. |
length | The desired number of bytes to read from the object contents. |
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.
true
if the object was removed from the store at its release, or false
if it was retained. 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.
offset | The zero-based starting offset at which to start to write the specified contents. |
buffer | The content to write to the underlying object. |
length | The number of bytes from the given buffer to write into the object. |
Implemented in Deveel.Data.Store.ObjectStore.LargeObject.
|
get |
Gets the unique identifier of the object within the system.
Definition at line 39 of file ILargeObject.cs.
|
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.
Definition at line 69 of file ILargeObject.cs.
|
get |
Gets a value indicating whether the object is compressed.
Definition at line 61 of file ILargeObject.cs.
|
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.