skip_list

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LatchOpCase

type LatchOpCase int32
const (
	SKIP_LIST_UTIL_GET_LATCH LatchOpCase = iota
	SKIP_LIST_UTIL_UNLATCH
)

type SkipList

type SkipList struct {
	SentinelNodeID types.PageID
	// contains filtered or unexported fields
}

func NewSkipList

func NewSkipList(bpm *buffer.BufferPoolManager, keyType types.TypeID) *SkipList

func (*SkipList) FindNode

func (sl *SkipList) FindNode(key *types.Value, opType SkipListOpType) (isSuccess bool, foundNode *skip_list_page.SkipListBlockPage, predOfCorners_ []skip_list_page.SkipListCornerInfo, corners_ []skip_list_page.SkipListCornerInfo)

ATTENTION: this method returns with keep having RLatch or WLatch of corners_[0] and one pin of corners_[0] (when corners_[0] is startNode, having pin count is two, but caller does not have to consider the difference)

func (*SkipList) FindNodeWithEntryIdxForItr

func (sl *SkipList) FindNodeWithEntryIdxForItr(key *types.Value) (found_ bool, node_ *skip_list_page.SkipListBlockPage, idx_ int32)

ATTENTION: this method returns with keep having RLatch of corners_[0] and pinned corners_[0]

func (*SkipList) GetHeaderPageId

func (sl *SkipList) GetHeaderPageId() types.PageID

func (*SkipList) GetNodeLevel

func (sl *SkipList) GetNodeLevel() int32

func (*SkipList) GetValue

func (sl *SkipList) GetValue(key *types.Value) uint64

func (*SkipList) Insert

func (sl *SkipList) Insert(key *types.Value, value uint64) (err error)

func (*SkipList) Iterator

func (sl *SkipList) Iterator(rangeStartKey *types.Value, rangeEndKey *types.Value) *SkipListIterator

func (*SkipList) Remove

func (sl *SkipList) Remove(key *types.Value, value uint64) (isDeleted_ bool)

type SkipListIterator

type SkipListIterator struct {
	// contains filtered or unexported fields
}

func NewSkipListIterator

func NewSkipListIterator(sl *SkipList, rangeStartKey *types.Value, rangeEndKey *types.Value) *SkipListIterator

func (*SkipListIterator) Next

func (itr *SkipListIterator) Next() (done bool, err error, key *types.Value, rid *page.RID)

type SkipListOpType

type SkipListOpType int32
const (
	SKIP_LIST_OP_GET SkipListOpType = iota
	SKIP_LIST_OP_REMOVE
	SKIP_LIST_OP_INSERT
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL