buffer

package
v0.0.0-...-16e0698 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func NewBuffer

func NewBuffer(fm *file.Manager, lm *log.Manager) *Buffer

func (*Buffer) BlockID

func (b *Buffer) BlockID() file.BlockID

func (*Buffer) IsPinned

func (b *Buffer) IsPinned() bool

func (*Buffer) Page

func (b *Buffer) Page() *file.Page

func (*Buffer) SetModified

func (b *Buffer) SetModified(txNum int32, lsn log.SequenceNumber)

func (*Buffer) TxNum

func (b *Buffer) TxNum() int32

type Manager

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

func NewManager

func NewManager(
	ctx context.Context,
	fm *file.Manager,
	lm *log.Manager,
	buffNum int,
	opts ...ManagerOption,
) *Manager

func (*Manager) AvailableNum

func (m *Manager) AvailableNum() int

func (*Manager) FlushAll

func (m *Manager) FlushAll(txNum int32) error

func (*Manager) Pin

func (m *Manager) Pin(blockID file.BlockID) (*Buffer, error)

func (*Manager) Unpin

func (m *Manager) Unpin(b *Buffer)

type ManagerOption

type ManagerOption func(*Manager)

func WithMaxWaitTime

func WithMaxWaitTime(d time.Duration) ManagerOption

Jump to

Keyboard shortcuts

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