handle

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Active int32 = iota
	Closing
	Closed
)

Variables

View Source
var (
	EmptySegmentIt = new(SegmentIt)
)

Functions

func NewBlockIt

func NewBlockIt(segment *Segment, blkIds []uint64) dbi.IBlockIt

func NewSegmentIt

func NewSegmentIt(ss *Snapshot) dbi.ISegmentIt

func NewSegmentLinkIt

func NewSegmentLinkIt(ss *Snapshot) dbi.ISegmentIt

Types

type Block

type Block struct {
	Host *Segment
	Id   uint64
}

func (*Block) GetID

func (blk *Block) GetID() uint64

func (*Block) GetSegmentID

func (blk *Block) GetSegmentID() uint64

func (*Block) GetTableID

func (blk *Block) GetTableID() uint64

func (*Block) Prefetch

func (blk *Block) Prefetch() dbi.IBatchReader

type BlockIt

type BlockIt struct {
	Segment *Segment
	Ids     []uint64
	Pos     int
}

func (*BlockIt) Close

func (it *BlockIt) Close() error

func (*BlockIt) GetHandle

func (it *BlockIt) GetHandle() dbi.IBlock

func (*BlockIt) Next

func (it *BlockIt) Next()

func (*BlockIt) Valid

func (it *BlockIt) Valid() bool

type CloseSegmentItCB

type CloseSegmentItCB func(dbi.ISegmentIt)

type Segment

type Segment struct {
	Data iface.ISegment
	Attr []int
}

func (*Segment) BlockIds

func (seg *Segment) BlockIds() []uint64

func (*Segment) GetBlock

func (seg *Segment) GetBlock(id uint64) dbi.IBlock

func (*Segment) GetID

func (seg *Segment) GetID() uint64

func (*Segment) GetTableID

func (seg *Segment) GetTableID() uint64

func (*Segment) NewIt

func (seg *Segment) NewIt() dbi.IBlockIt

type SegmentIt

type SegmentIt struct {
	OnCloseCB CloseSegmentItCB
	Snapshot  *Snapshot
	Pos       int
}

func (*SegmentIt) Close

func (it *SegmentIt) Close() error

func (*SegmentIt) GetHandle

func (it *SegmentIt) GetHandle() dbi.ISegment

func (*SegmentIt) Next

func (it *SegmentIt) Next()

func (*SegmentIt) Valid

func (it *SegmentIt) Valid() bool

type SegmentLinkIt

type SegmentLinkIt struct {
	OnCloseCB CloseSegmentItCB
	Snapshot  *Snapshot
	Cursor    iface.ISegment
}

func (*SegmentLinkIt) Close

func (it *SegmentLinkIt) Close() error

func (*SegmentLinkIt) GetHandle

func (it *SegmentLinkIt) GetHandle() dbi.ISegment

func (*SegmentLinkIt) Next

func (it *SegmentLinkIt) Next()

func (*SegmentLinkIt) Valid

func (it *SegmentLinkIt) Valid() bool

type Snapshot

type Snapshot struct {
	TableData iface.ITableData
	Attr      []int
	Ids       []uint64
	ScanAll   bool
	State     int32

	ActiveIters int32
	// contains filtered or unexported fields
}

func NewEmptySnapshot

func NewEmptySnapshot() *Snapshot

func NewLinkAllSnapshot

func NewLinkAllSnapshot(attrs []int, td iface.ITableData) *Snapshot

func NewSnapshot

func NewSnapshot(ids []uint64, attrs []int, td iface.ITableData) *Snapshot

func (*Snapshot) Close

func (ss *Snapshot) Close() error

func (*Snapshot) GetSegment

func (ss *Snapshot) GetSegment(id uint64) dbi.ISegment

func (*Snapshot) NewIt

func (ss *Snapshot) NewIt() dbi.ISegmentIt

func (*Snapshot) SegmentIds

func (ss *Snapshot) SegmentIds() []uint64

Jump to

Keyboard shortcuts

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