storage

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryEvictionReason

type MemoryEvictionReason int
const (
	UserTriggerEvictionReason   MemoryEvictionReason = 1
	PeriodicalEvictionReason    MemoryEvictionReason = 2
	AfterWalFlushEvictionReason MemoryEvictionReason = 3
)

func (MemoryEvictionReason) String

func (m MemoryEvictionReason) String() string

type MemoryEvictionResult

type MemoryEvictionResult struct {
	PagesCountBeforeEvict int
	EvictedCount          int
	AccessedPageCount     int
	Error                 error
}

func (MemoryEvictionResult) String

func (m MemoryEvictionResult) String() string

type Storage

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

func NewStorage

func NewStorage(config *util.Config) *Storage

func (*Storage) Access

func (s *Storage) Access() (StorageAccessor, error)

func (*Storage) EvictMemory

func (s *Storage) EvictMemory(reason MemoryEvictionReason) MemoryEvictionResult

func (*Storage) FlushWal

func (s *Storage) FlushWal()

func (*Storage) Stop

func (s *Storage) Stop()

type StorageAccessor

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

func (*StorageAccessor) AcquirePage

func (s *StorageAccessor) AcquirePage(set page.CandleSet, exclusive bool) (func(), error)

func (*StorageAccessor) Commit

func (s *StorageAccessor) Commit() error

func (*StorageAccessor) Execute

func (s *StorageAccessor) Execute(cmd command.CommandContent) (interface{}, error)

func (*StorageAccessor) GetPage

func (s *StorageAccessor) GetPage(set page.CandleSet, exclusive bool) (*page.Page, error)

Methods to implement database.pageAccessor

func (*StorageAccessor) Rollback

func (s *StorageAccessor) Rollback()

func (*StorageAccessor) RollbackIfActive

func (s *StorageAccessor) RollbackIfActive()

func (*StorageAccessor) Start

func (s *StorageAccessor) Start() (txId uint64, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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