lumpindex

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0, 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 LumpIndex

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

func NewIndex

func NewIndex() *LumpIndex

func (*LumpIndex) Count

func (index *LumpIndex) Count() uint64

thread safe

func (*LumpIndex) DataPortions

func (index *LumpIndex) DataPortions() []portion.DataPortion

Loop all the index, if it's a Dataportion(not a Journalportion), It must occupy some part of the disk, Append this DataPortion to a

func (*LumpIndex) Delete

func (index *LumpIndex) Delete(id lump.LumpId) bool

func (*LumpIndex) DeleteRange

func (index *LumpIndex) DeleteRange(start lump.LumpId, end lump.LumpId)

func (*LumpIndex) FirstEmpty

func (index *LumpIndex) FirstEmpty() (id lump.LumpId, ok bool)

func (*LumpIndex) Get

func (index *LumpIndex) Get(id lump.LumpId) (p portion.Portion, err error)

func (*LumpIndex) InsertDataPortion

func (index *LumpIndex) InsertDataPortion(id lump.LumpId, data portion.DataPortion)

func (*LumpIndex) InsertJournalPortion

func (index *LumpIndex) InsertJournalPortion(id lump.LumpId, data portion.JournalPortion)

func (*LumpIndex) JudyDataPortions

func (index *LumpIndex) JudyDataPortions() *judy.Judy1

WARNING: this function returns judy.Judy1, It can not be released by go gc. the developer is responsible to free it judyPortionArray is ordered by start of each portion

func (*LumpIndex) List

func (index *LumpIndex) List() []lump.LumpId

func (*LumpIndex) ListRange

func (index *LumpIndex) ListRange(start lump.LumpId, end lump.LumpId) []lump.LumpId

func (*LumpIndex) Max

func (index *LumpIndex) Max() (id lump.LumpId, ok bool)

func (*LumpIndex) MemoryUsed

func (index *LumpIndex) MemoryUsed() uint64

func (*LumpIndex) Min

func (index *LumpIndex) Min() (id lump.LumpId, ok bool)

Jump to

Keyboard shortcuts

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