buffer

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeManager

func NewNodeManager(maxsize uint64, evicter bm.IEvictHolder) *nodeManager

Types

type Node

type Node struct {
	common.RefHelper
	sync.RWMutex

	DestroyFunc    func()
	LoadFunc       func()
	UnloadableFunc func() bool
	UnloadFunc     func()
	// contains filtered or unexported fields
}

func NewNode

func NewNode(impl base.INode, mgr base.INodeManager, id common.ID, size uint64) *Node

func (*Node) Close

func (n *Node) Close() error

func (*Node) Destroy

func (n *Node) Destroy()

func (*Node) Expand

func (n *Node) Expand(delta uint64, fn func() error) error

func (*Node) GetID

func (n *Node) GetID() common.ID

func (*Node) GetState

func (n *Node) GetState() iface.NodeState

Should be guarded by lock

func (*Node) IncIteration

func (n *Node) IncIteration() uint64

func (*Node) IsClosed

func (n *Node) IsClosed() bool

func (*Node) IsLoaded

func (n *Node) IsLoaded() bool

Should be guarded by lock

func (*Node) Iteration

func (n *Node) Iteration() uint64

func (*Node) Load

func (n *Node) Load()

Should be guarded by lock

func (*Node) MakeHandle

func (n *Node) MakeHandle() base.INodeHandle

func (*Node) Size

func (n *Node) Size() uint64

func (*Node) Unload

func (n *Node) Unload()

Should be guarded by lock

func (*Node) Unloadable

func (n *Node) Unloadable() bool

Should be guarded by lock

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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