Method | Description | |
---|---|---|
Allocate ( int count, bool aligned = false ) : Slice |
Allocate an empty space in the buffer There is NO garantees that the allocated slice will be pre-filled with zeroes. |
|
Intern ( Slice data, bool aligned = false ) : Slice |
Copy a slice into the buffer, with optional alignement, and return a new identical slice.
|
|
InternRange ( FdbKeyRange range ) : FdbKeyRange |
Copy a pair of keys into the buffer, and return a new identical pair
|
|
InternRange ( Slice begin, Slice end ) : FdbKeyRange |
Copy a pair of keys into the buffer, and return a new identical pair
|
|
InternRangeFromKey ( Slice key ) : FdbKeyRange |
Copy a key into the buffer, and return a new range containing only that key
|
|
InternSelector ( FdbKeySelector selector ) : FdbKeySelector |
Copy a key selector into the buffer, and return a new identical selector
|
|
InternSelectorPair ( FdbKeySelectorPair pair ) : FdbKeySelectorPair |
Copy a pair of key selectors into the buffer, and return a new identical pair
|
|
Reset ( ) : void |
Reset the buffer to its initial state None of the existing buffers are kept, but the new page will keep the current page size (that may be larger than the initial size). Any previously allocated slice from this buffer will be untouched. |
|
ResetUnsafe ( ) : void |
Reset the buffer to its initial state, and reuse the current page. This recycle the current page. The caller should ensure that nobody has a reference to a previously generated slice. |
|
SliceBuffer ( ) : JetBrains.Annotations |
Create a new slice buffer with the default page size
|
|
SliceBuffer ( int pageSize ) : JetBrains.Annotations |
Ceate a new slice buffer with the specified page size
|
Method | Description | |
---|---|---|
AllocateFallback ( int count ) : Slice | ||
GetPages ( ) : Slice[] | ||
Intern ( Slice data, Slice suffix, bool aligned = false ) : Slice |
Copy a slice into the buffer, immediately followed by a suffix, and return a new slice that is the concatenation of the two. When data is empty, suffix is returned without being copied to the buffer itself. |
|
Keep ( Slice chunk ) : void |
Adds a buffer to the list of allocated slices
|
|
Reset ( bool keep ) : void |
public Allocate ( int count, bool aligned = false ) : Slice | ||
count | int | Number of bytes to allocate |
aligned | bool | If true, align the start of the slice with the default padding size. |
return | Slice |
public Intern ( Slice data, bool aligned = false ) : Slice | ||
data | Slice | Data to copy in the buffer |
aligned | bool | If true, align the index of first byte of the slice with a multiple of 8 bytes |
return | Slice |
public InternRange ( FdbKeyRange range ) : FdbKeyRange | ||
range | FdbKeyRange | Key range |
return | FdbKeyRange |
public InternRange ( Slice begin, Slice end ) : FdbKeyRange | ||
begin | Slice | Begin key of the range |
end | Slice | End key of the range |
return | FdbKeyRange |
public InternRangeFromKey ( Slice key ) : FdbKeyRange | ||
key | Slice | Key to copy to the buffer |
return | FdbKeyRange |
public InternSelector ( FdbKeySelector selector ) : FdbKeySelector | ||
selector | FdbKeySelector | Key selector to copy to the buffer |
return | FdbKeySelector |
public InternSelectorPair ( FdbKeySelectorPair pair ) : FdbKeySelectorPair | ||
pair | FdbKeySelectorPair | Pair of key selectors to copy to the buffer |
return | FdbKeySelectorPair |
public SliceBuffer ( ) : JetBrains.Annotations | ||
return | JetBrains.Annotations |
public SliceBuffer ( int pageSize ) : JetBrains.Annotations | ||
pageSize | int | Initial page size |
return | JetBrains.Annotations |