An IArea that is backed by a StoreBase.
More...
|
| StoreArea (StoreBase store, long id, long offset, bool readOnly) |
|
| StoreArea (StoreBase store, long id, long offset, bool readOnly, long fixedSize) |
|
void | CopyTo (IArea destArea, int size) |
| Copies the given amount of bytes from the current position of the this area to another one. More...
|
|
int | Read (byte[] buffer, int offset, int length) |
| Reads an array of bytes from the underlying IArea and advances the position by length . More...
|
|
void | Write (byte[] buffer, int offset, int length) |
|
void | Flush () |
|
An IArea that is backed by a StoreBase.
Definition at line 887 of file StoreBase.cs.
Deveel.Data.Store.StoreBase.StoreArea.StoreArea |
( |
StoreBase |
store, |
|
|
long |
id, |
|
|
long |
offset, |
|
|
bool |
readOnly |
|
) |
| |
|
inline |
Definition at line 893 of file StoreBase.cs.
898 store.CheckOffset(offset);
900 store.Read(offset,
buffer, 0, 8);
903 throw new IOException(
"Store being constructed on deleted area.");
905 long maxSize = v - 16;
A wrapper for an array of byte.
static long ReadInt8(byte[] arr, int offset)
Deveel.Data.Store.StoreBase.StoreArea.StoreArea |
( |
StoreBase |
store, |
|
|
long |
id, |
|
|
long |
offset, |
|
|
bool |
readOnly, |
|
|
long |
fixedSize |
|
) |
| |
|
inline |
Definition at line 911 of file StoreBase.cs.
918 store.CheckOffset(offset);
const long FixedAreaOffset
long Deveel.Data.Store.StoreBase.StoreArea.CheckAreaOffset |
( |
int |
diff | ) |
|
|
inlineprotected |
Definition at line 951 of file StoreBase.cs.
954 throw new IOException(
"Trying to access a position out of area bounds.");
void Deveel.Data.Store.StoreBase.StoreArea.CopyTo |
( |
IArea |
destArea, |
|
|
int |
size |
|
) |
| |
|
inline |
Copies the given amount of bytes from the current position of the this area to another one.
- Parameters
-
destArea | The IArea where to write. |
size | The number of bytes to Write. |
Implements Deveel.Data.Store.IArea.
Definition at line 961 of file StoreBase.cs.
965 const int bufferSize = 2048;
966 byte[] buf =
new byte[bufferSize];
967 int toCopy =
System.Math.Min(size, bufferSize);
970 var read =
Read(buf, 0, toCopy);
974 destArea.Write(buf, 0, read);
976 toCopy =
System.Math.Min(size, bufferSize);
int Read(byte[] buffer, int offset, int length)
Reads an array of bytes from the underlying IArea and advances the position by length ...
void Deveel.Data.Store.StoreBase.StoreArea.Flush |
( |
| ) |
|
|
inline |
int Deveel.Data.Store.StoreBase.StoreArea.Read |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inline |
Reads an array of bytes from the underlying IArea and advances the position by length .
- Parameters
-
buffer | The destination buffer into which to Read the number of bytes given from the area. |
offset | The offset within the buffer from where to start writing the byte Read into. |
length | The number of bytes to Read from the area. This is also the incremental size of the position of the area. |
- Returns
- Returns the number of bytes actually Read from the IArea.
Implements Deveel.Data.Store.IArea.
Definition at line 980 of file StoreBase.cs.
abstract int Read(long offset, byte[] buffer, int index, int length)
long CheckAreaOffset(int diff)
void Deveel.Data.Store.StoreBase.StoreArea.Write |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inline |
- Parameters
-
Implements Deveel.Data.Store.IArea.
Definition at line 984 of file StoreBase.cs.
986 throw new IOException(
"The area is read-only access.");
void Write(long offset, byte value)
long CheckAreaOffset(int diff)
byte [] Deveel.Data.Store.StoreBase.StoreArea.buffer = new byte[BufferSize] |
|
private |
const int Deveel.Data.Store.StoreBase.StoreArea.BufferSize = 8 |
|
private |
long Deveel.Data.Store.StoreBase.StoreArea.position |
|
private |
long Deveel.Data.Store.StoreBase.StoreArea.EndOffset |
|
getsetprivate |
long Deveel.Data.Store.StoreBase.StoreArea.Id |
|
getprivate set |
virtual bool Deveel.Data.Store.StoreBase.StoreArea.IsReadOnly |
|
getprivate set |
int Deveel.Data.Store.StoreBase.StoreArea.Length |
|
get |
long Deveel.Data.Store.StoreBase.StoreArea.Position |
|
getset |
long Deveel.Data.Store.StoreBase.StoreArea.StartOffset |
|
getsetprivate |
StoreBase Deveel.Data.Store.StoreBase.StoreArea.Store |
|
getsetprivate |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Store/StoreBase.cs