memory

package
v0.0.0-...-be256ff Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvictionFunc

type EvictionFunc func(dirty bool, hitCount int, content *page.Page) (shouldEvict bool, quit bool, err error)

type MaxHeap

type MaxHeap []int

func (MaxHeap) Len

func (h MaxHeap) Len() int

func (MaxHeap) Less

func (h MaxHeap) Less(i, j int) bool

func (*MaxHeap) Pop

func (h *MaxHeap) Pop() interface{}

func (*MaxHeap) Push

func (h *MaxHeap) Push(x interface{})

func (MaxHeap) Swap

func (h MaxHeap) Swap(i, j int)

type Memory

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

func (*Memory) ForceWrite

func (m *Memory) ForceWrite(set common.UniqueKeyable, content *page.Page) (added bool, err error)

func (*Memory) HasPage

func (m *Memory) HasPage(set common.UniqueKeyable) bool

func (*Memory) Init

func (m *Memory) Init(set page.CandleSet)

func (*Memory) RangeForEviction

func (m *Memory) RangeForEviction(fn EvictionFunc)

func (*Memory) Read

func (m *Memory) Read(txId uint64, set common.UniqueKeyable) (reader MemoryReader, ok bool)

func (*Memory) StartWrite

func (m *Memory) StartWrite(txId uint64, set common.UniqueKeyable) MemoryWriter

func (*Memory) StatsForEviction

func (m *Memory) StatsForEviction(maxPages int) (pageCount int, thresholdHitCount int)

type MemoryReader

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

func (*MemoryReader) Done

func (r *MemoryReader) Done()

func (*MemoryReader) Get

func (r *MemoryReader) Get() *page.Page

type MemoryWriter

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

func (*MemoryWriter) Commit

func (m *MemoryWriter) Commit()

func (*MemoryWriter) Rollback

func (m *MemoryWriter) Rollback()

func (*MemoryWriter) WritableContent

func (m *MemoryWriter) WritableContent() *page.Page

type UnlockFunc

type UnlockFunc func()

Jump to

Keyboard shortcuts

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