Documentation
¶
Index ¶
- func MakeNodeFileName(id uint64) string
- func NewBufferHandle(n nif.INodeHandle, mgr mgrif.IBufferManager) nif.IBufferHandle
- func NewNodeBuffer(id uint64, node buf.IMemoryNode) iface.INodeBuffer
- func NewNodeCleaner(filename []byte) iface.Cleaner
- func NewNodeHandle(ctx *NodeHandleCtx) nif.INodeHandle
- func NewNodeIO(nh iface.INodeHandle, dir []byte) iface.IOHandle
- func NewNodeIOWithReader(nh iface.INodeHandle, reader io.Reader) iface.IOHandle
- func NewNodeReader(nh iface.INodeHandle, filename []byte, reader io.Reader) iface.Reader
- func NewNodeWriter(nh iface.INodeHandle, filename []byte) iface.Writer
- type BufferHandle
- type NodeBuffer
- type NodeCleaner
- type NodeHandle
- func (h *NodeHandle) Clean() error
- func (h *NodeHandle) Close() error
- func (h *NodeHandle) CommitLoad() error
- func (h *NodeHandle) FlushData() error
- func (h *NodeHandle) GetBuffer() buf.IBuffer
- func (h *NodeHandle) GetCapacity() uint64
- func (h *NodeHandle) GetFile() common.IVFile
- func (h *NodeHandle) GetID() uint64
- func (h *NodeHandle) GetNodeCreator() buf.MemoryNodeConstructor
- func (h *NodeHandle) GetState() nif.NodeState
- func (h *NodeHandle) HasRef() bool
- func (h *NodeHandle) IncIteration() uint64
- func (h *NodeHandle) IsClosed() bool
- func (h *NodeHandle) IsCompress() bool
- func (h *NodeHandle) IsSpillable() bool
- func (h *NodeHandle) Iteration() uint64
- func (h *NodeHandle) MakeHandle() nif.IBufferHandle
- func (h *NodeHandle) PrepareLoad() bool
- func (h *NodeHandle) Ref()
- func (h *NodeHandle) RollbackLoad()
- func (h *NodeHandle) SetBuffer(buf buf.IBuffer) error
- func (h *NodeHandle) String() string
- func (h *NodeHandle) UnRef() bool
- func (h *NodeHandle) Unload()
- func (h *NodeHandle) Unloadable() bool
- type NodeHandleCtx
- type NodeReader
- type NodeWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeNodeFileName ¶
func NewBufferHandle ¶
func NewBufferHandle(n nif.INodeHandle, mgr mgrif.IBufferManager) nif.IBufferHandle
func NewNodeBuffer ¶
func NewNodeBuffer(id uint64, node buf.IMemoryNode) iface.INodeBuffer
func NewNodeCleaner ¶
func NewNodeHandle ¶
func NewNodeHandle(ctx *NodeHandleCtx) nif.INodeHandle
func NewNodeIOWithReader ¶
func NewNodeReader ¶
func NewNodeWriter ¶
func NewNodeWriter(nh iface.INodeHandle, filename []byte) iface.Writer
Types ¶
type BufferHandle ¶
type BufferHandle struct {
Handle iface.INodeHandle
Manager mgrif.IBufferManager
}
BufferHandle is created from IBufferManager::Pin, which will set the INodeHandle reference to 1 The following IBufferManager::Pin will call INodeHandle::Ref to increment the reference count BufferHandle should alway be closed manually when it is not needed, which will call IBufferManager::Unpin
func (*BufferHandle) Close ¶
func (h *BufferHandle) Close() error
func (*BufferHandle) GetHandle ¶
func (h *BufferHandle) GetHandle() nif.INodeHandle
func (*BufferHandle) GetID ¶
func (h *BufferHandle) GetID() uint64
type NodeBuffer ¶
func (*NodeBuffer) GetID ¶
func (nb *NodeBuffer) GetID() uint64
type NodeCleaner ¶
type NodeCleaner struct {
Filename []byte
}
func (*NodeCleaner) Clean ¶
func (nc *NodeCleaner) Clean() error
type NodeHandle ¶
type NodeHandle struct {
sync.Mutex
State iface.NodeState
ID uint64
Buff buf.IBuffer
Spillable bool
File common.IVFile
UseCompress bool
RTState iface.NodeRTState
Refs uint64
Manager mgrif.IBufferManager
Iter uint64
IO iface.IOHandle
Constructor buf.MemoryNodeConstructor
}
func (*NodeHandle) Clean ¶
func (h *NodeHandle) Clean() error
func (*NodeHandle) Close ¶
func (h *NodeHandle) Close() error
func (*NodeHandle) CommitLoad ¶
func (h *NodeHandle) CommitLoad() error
func (*NodeHandle) FlushData ¶
func (h *NodeHandle) FlushData() error
func (*NodeHandle) GetBuffer ¶
func (h *NodeHandle) GetBuffer() buf.IBuffer
func (*NodeHandle) GetCapacity ¶
func (h *NodeHandle) GetCapacity() uint64
func (*NodeHandle) GetFile ¶
func (h *NodeHandle) GetFile() common.IVFile
func (*NodeHandle) GetID ¶
func (h *NodeHandle) GetID() uint64
func (*NodeHandle) GetNodeCreator ¶
func (h *NodeHandle) GetNodeCreator() buf.MemoryNodeConstructor
func (*NodeHandle) GetState ¶
func (h *NodeHandle) GetState() nif.NodeState
func (*NodeHandle) HasRef ¶
func (h *NodeHandle) HasRef() bool
func (*NodeHandle) IncIteration ¶
func (h *NodeHandle) IncIteration() uint64
func (*NodeHandle) IsClosed ¶
func (h *NodeHandle) IsClosed() bool
func (*NodeHandle) IsCompress ¶
func (h *NodeHandle) IsCompress() bool
func (*NodeHandle) IsSpillable ¶
func (h *NodeHandle) IsSpillable() bool
func (*NodeHandle) Iteration ¶
func (h *NodeHandle) Iteration() uint64
func (*NodeHandle) MakeHandle ¶
func (h *NodeHandle) MakeHandle() nif.IBufferHandle
func (*NodeHandle) PrepareLoad ¶
func (h *NodeHandle) PrepareLoad() bool
func (*NodeHandle) Ref ¶
func (h *NodeHandle) Ref()
func (*NodeHandle) RollbackLoad ¶
func (h *NodeHandle) RollbackLoad()
func (*NodeHandle) String ¶
func (h *NodeHandle) String() string
func (*NodeHandle) UnRef ¶
func (h *NodeHandle) UnRef() bool
func (*NodeHandle) Unload ¶
func (h *NodeHandle) Unload()
func (*NodeHandle) Unloadable ¶
func (h *NodeHandle) Unloadable() bool
type NodeHandleCtx ¶
type NodeReader ¶
type NodeReader struct {
Handle iface.INodeHandle
Filename []byte
Reader io.Reader
}
func (*NodeReader) Load ¶
func (nr *NodeReader) Load() (err error)
type NodeWriter ¶
type NodeWriter struct {
Handle iface.INodeHandle
Filename []byte
}
func (*NodeWriter) Flush ¶
func (sw *NodeWriter) Flush() (err error)
Click to show internal directories.
Click to hide internal directories.