C# 클래스 FoundationDB.Client.Utils.SliceBuffer

파일 보기 프로젝트 열기: BedeGaming/foundationdb-dotnet-client

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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

메소드 상세

Allocate() 공개 메소드

Allocate an empty space in the buffer
There is NO garantees that the allocated slice will be pre-filled with zeroes.
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.
리턴 Slice

Intern() 공개 메소드

Copy a slice into the buffer, with optional alignement, and return a new identical 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
리턴 Slice

InternRange() 공개 메소드

Copy a pair of keys into the buffer, and return a new identical pair
public InternRange ( FdbKeyRange range ) : FdbKeyRange
range FdbKeyRange Key range
리턴 FdbKeyRange

InternRange() 공개 메소드

Copy a pair of keys into the buffer, and return a new identical pair
public InternRange ( Slice begin, Slice end ) : FdbKeyRange
begin Slice Begin key of the range
end Slice End key of the range
리턴 FdbKeyRange

InternRangeFromKey() 공개 메소드

Copy a key into the buffer, and return a new range containing only that key
public InternRangeFromKey ( Slice key ) : FdbKeyRange
key Slice Key to copy to the buffer
리턴 FdbKeyRange

InternSelector() 공개 메소드

Copy a key selector into the buffer, and return a new identical selector
public InternSelector ( FdbKeySelector selector ) : FdbKeySelector
selector FdbKeySelector Key selector to copy to the buffer
리턴 FdbKeySelector

InternSelectorPair() 공개 메소드

Copy a pair of key selectors into the buffer, and return a new identical pair
public InternSelectorPair ( FdbKeySelectorPair pair ) : FdbKeySelectorPair
pair FdbKeySelectorPair Pair of key selectors to copy to the buffer
리턴 FdbKeySelectorPair

Reset() 공개 메소드

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.
public Reset ( ) : void
리턴 void

ResetUnsafe() 공개 메소드

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.
public ResetUnsafe ( ) : void
리턴 void

SliceBuffer() 공개 메소드

Create a new slice buffer with the default page size
public SliceBuffer ( ) : JetBrains.Annotations
리턴 JetBrains.Annotations

SliceBuffer() 공개 메소드

Ceate a new slice buffer with the specified page size
public SliceBuffer ( int pageSize ) : JetBrains.Annotations
pageSize int Initial page size
리턴 JetBrains.Annotations