DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
A data store that is backed by a file located at the path given. More...
Public Member Functions | |
FileStoreData (string filePath) | |
void | Dispose () |
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 | |
string | FilePath [get, private set] |
bool | IsOpen [get, private set] |
bool | Exists [get] |
long | Length [get] |
bool | IsReadOnly [get, private set] |
Properties inherited from Deveel.Data.Store.IStoreData | |
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... | |
Private Member Functions | |
~FileStoreData () | |
void | Dispose (bool disposing) |
Private Attributes | |
LocalFile | file |
readonly object | objectLock = new object() |
A data store that is backed by a file located at the path given.
Definition at line 24 of file FileStoreData.cs.
|
inline |
Definition at line 28 of file FileStoreData.cs.
|
inlineprivate |
Definition at line 36 of file FileStoreData.cs.
|
inline |
Closes the block and make it unavailable.
When IDisposable.Dispose is invoked this method is also called to prevent any operation before disposal.
Implements Deveel.Data.Store.IStoreData.
Definition at line 93 of file FileStoreData.cs.
|
inline |
Deletes the data block.
true
if the block was successfully deleted, or false
otherwise. Implements Deveel.Data.Store.IStoreData.
Definition at line 73 of file FileStoreData.cs.
|
inline |
Definition at line 44 of file FileStoreData.cs.
|
inlineprivate |
Definition at line 49 of file FileStoreData.cs.
|
inline |
Flushes the data written in the temporary store of the block to the underlying medium.
Implements Deveel.Data.Store.IStoreData.
Definition at line 131 of file FileStoreData.cs.
|
inline |
Opens the data block and make it ready to be accessed.
readOnly | Indicates if the block must be open in read-only mode. |
Implements Deveel.Data.Store.IStoreData.
Definition at line 85 of file FileStoreData.cs.
|
inline |
Reads a given amount of data from the block, starting at the absolute position given and copying into the provided buffer.
position | The absolute position within the data block from where to start reading. |
buffer | The destination buffer where the data read will be filled in. |
offset | The starting offset within the buffer where to start copying the data read. |
length | The desired number of bytes to read from the data block. |
Implements Deveel.Data.Store.IStoreData.
Definition at line 103 of file FileStoreData.cs.
|
inline |
Sets the length of the data block.
value | The 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.
Implements Deveel.Data.Store.IStoreData.
Definition at line 141 of file FileStoreData.cs.
|
inline |
Writes a given buffer into the block, starting at the absolute position given.
position | The absolute position within the data block from where to start writing. |
buffer | The data to write into the block. |
offset | The starting offset within the buffer where to start writing data from. |
length | The number of bytes to write into the data block. |
Implements Deveel.Data.Store.IStoreData.
Definition at line 117 of file FileStoreData.cs.
|
private |
Definition at line 25 of file FileStoreData.cs.
|
private |
Definition at line 26 of file FileStoreData.cs.
|
get |
Definition at line 59 of file FileStoreData.cs.
|
getprivate set |
Definition at line 40 of file FileStoreData.cs.
|
getprivate set |
Definition at line 42 of file FileStoreData.cs.
|
getprivate set |
Definition at line 71 of file FileStoreData.cs.
|
get |
Definition at line 67 of file FileStoreData.cs.