|
| InMemoryArea (long id, bool readOnly, byte[] data, int offset, int length) |
|
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 () |
|
|
long | Id [get, private set] |
|
bool | IsReadOnly [get, private set] |
|
long | Position [get, set] |
|
int | Capacity [get] |
|
int | Length [get, private set] |
|
long | Id [get] |
| Returns the unique identifier that represents this area. More...
|
|
bool | IsReadOnly [get] |
| Gets a value indicating whether this area can be written or not. More...
|
|
long | Position [get, set] |
| Returns or sets the current position of the pointer within the area. More...
|
|
int | Length [get] |
|
Definition at line 207 of file InMemoryStore.cs.
Deveel.Data.Store.InMemoryStore.InMemoryArea.InMemoryArea |
( |
long |
id, |
|
|
bool |
readOnly, |
|
|
byte[] |
data, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inline |
long Deveel.Data.Store.InMemoryStore.InMemoryArea.CheckPositionBounds |
( |
int |
diff | ) |
|
|
inlineprivate |
Definition at line 245 of file InMemoryStore.cs.
248 throw new IOException(
String.Format(
"Attempt to read out of bounds: from {0} to {1} (position {2} to {3})",
A long string in the system.
readonly int startPosition
void Deveel.Data.Store.InMemoryStore.InMemoryArea.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 256 of file InMemoryStore.cs.
257 const int bufferSize = 2048;
258 byte[] buf =
new byte[bufferSize];
259 int toCopy =
System.Math.Min(size, bufferSize);
262 Read(buf, 0, toCopy);
263 destArea.Write(buf, 0, toCopy);
265 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.InMemoryStore.InMemoryArea.Flush |
( |
| ) |
|
|
inline |
int Deveel.Data.Store.InMemoryStore.InMemoryArea.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 269 of file InMemoryStore.cs.
long CheckPositionBounds(int diff)
void Deveel.Data.Store.InMemoryStore.InMemoryArea.Write |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inline |
readonly byte [] Deveel.Data.Store.InMemoryStore.InMemoryArea.data |
|
private |
readonly int Deveel.Data.Store.InMemoryStore.InMemoryArea.endPosition |
|
private |
long Deveel.Data.Store.InMemoryStore.InMemoryArea.position |
|
private |
readonly int Deveel.Data.Store.InMemoryStore.InMemoryArea.startPosition |
|
private |
int Deveel.Data.Store.InMemoryStore.InMemoryArea.Capacity |
|
get |
long Deveel.Data.Store.InMemoryStore.InMemoryArea.Id |
|
getprivate set |
bool Deveel.Data.Store.InMemoryStore.InMemoryArea.IsReadOnly |
|
getprivate set |
int Deveel.Data.Store.InMemoryStore.InMemoryArea.Length |
|
getprivate set |
long Deveel.Data.Store.InMemoryStore.InMemoryArea.Position |
|
getset |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Store/InMemoryStore.cs