Documentation ¶
Index ¶
- type LumpIndex
- func (index *LumpIndex) Count() uint64
- func (index *LumpIndex) DataPortions() []portion.DataPortion
- func (index *LumpIndex) Delete(id lump.LumpId) bool
- func (index *LumpIndex) DeleteRange(start lump.LumpId, end lump.LumpId)
- func (index *LumpIndex) FirstEmpty() (id lump.LumpId, ok bool)
- func (index *LumpIndex) Get(id lump.LumpId) (p portion.Portion, err error)
- func (index *LumpIndex) InsertDataPortion(id lump.LumpId, data portion.DataPortion)
- func (index *LumpIndex) InsertJournalPortion(id lump.LumpId, data portion.JournalPortion)
- func (index *LumpIndex) JudyDataPortions() *judy.Judy1
- func (index *LumpIndex) List() []lump.LumpId
- func (index *LumpIndex) ListRange(start lump.LumpId, end lump.LumpId) []lump.LumpId
- func (index *LumpIndex) Max() (id lump.LumpId, ok bool)
- func (index *LumpIndex) MemoryUsed() uint64
- func (index *LumpIndex) Min() (id lump.LumpId, ok bool)
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 (*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) DeleteRange ¶
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 ¶
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) MemoryUsed ¶
Click to show internal directories.
Click to hide internal directories.