pool

package
v0.0.0-...-6120cfb Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAvailablePage = errors.New("failed to find an available page")
	ErrPinCountZero    = errors.New("page pin count is not zero")
)

Functions

This section is empty.

Types

type BufferPoolManager

type BufferPoolManager interface {
	FetchPage(ctx Ctx, pageId uint64, opts ...*FetchPageOption) (page.Page, error)
	UnpinPage(ctx Ctx, pageId uint64, dirty bool) (bool, error)
	NewPage(ctx Ctx, pageId *uint64, opts ...*NewPageOption) (page.Page, error)
	DeletePage(ctx Ctx, pageId uint64) (bool, error)
	FlushAll(ctx Ctx) error
}

func NewBufferPool

func NewBufferPool(o Options) BufferPoolManager

NewBufferPool TODO: pre-allocation

type Ctx

type Ctx interface {
}

Ctx TODO

type FetchPageOption

type FetchPageOption struct {
}

type FindOneAvailablePageOption

type FindOneAvailablePageOption struct {
}

type Frame

type Frame uint64

type NewPageOption

type NewPageOption struct {
}

func MergeNewPageOptions

func MergeNewPageOptions(opts ...*NewPageOption) *NewPageOption

type Options

type Options struct {
	DiskManager disk.BasicManager
	Replacer    replacer.Replacer
	Cap         uint64
	Len         uint64
}

type PageID

type PageID uint64

Jump to

Keyboard shortcuts

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