Documentation
¶
Index ¶
- Constants
- func NewNodeManager(maxsize uint64, evicter IEvictHolder) *nodeManager
- type EvictNode
- type IEvictHolder
- type Node
- func (n *Node) Close() error
- func (n *Node) Destroy()
- func (n *Node) Expand(delta uint64, fn func() error) error
- func (n *Node) GetID() common.ID
- func (n *Node) GetState() base.NodeState
- func (n *Node) IncIteration() uint64
- func (n *Node) IsClosed() bool
- func (n *Node) IsLoaded() bool
- func (n *Node) Iteration() uint64
- func (n *Node) Load()
- func (n *Node) MakeHandle() base.INodeHandle
- func (n *Node) Size() uint64
- func (n *Node) Unload()
- func (n *Node) Unloadable() bool
- type SimpleEvictHolder
- type SimpleEvictHolderCtx
Constants ¶
View Source
const (
EVICT_HOLDER_CAPACITY uint64 = 100000
)
Variables ¶
This section is empty.
Functions ¶
func NewNodeManager ¶
func NewNodeManager(maxsize uint64, evicter IEvictHolder) *nodeManager
Types ¶
type EvictNode ¶
type EvictNode struct {
Handle base.IEvictHandle
Iter uint64
}
func (*EvictNode) Unloadable ¶
func (node *EvictNode) Unloadable(h base.IEvictHandle) bool
type IEvictHolder ¶
func NewSimpleEvictHolder ¶
func NewSimpleEvictHolder(ctx ...any) IEvictHolder
type Node ¶
type Node struct {
common.RefHelper
sync.RWMutex
DestroyFunc func()
LoadFunc func()
UnloadableFunc func() bool
UnloadFunc func()
// contains filtered or unexported fields
}
func (*Node) IncIteration ¶
func (*Node) MakeHandle ¶
func (n *Node) MakeHandle() base.INodeHandle
type SimpleEvictHolder ¶
func (*SimpleEvictHolder) Dequeue ¶
func (holder *SimpleEvictHolder) Dequeue() *EvictNode
func (*SimpleEvictHolder) Enqueue ¶
func (holder *SimpleEvictHolder) Enqueue(node *EvictNode)
type SimpleEvictHolderCtx ¶
type SimpleEvictHolderCtx struct {
QCapacity uint64
}
Click to show internal directories.
Click to hide internal directories.