Documentation
¶
Index ¶
- Variables
- func AtomicCASRTState(addr *NodeRTState, old, new NodeRTState) bool
- func AtomicCASState(addr *NodeState, old, new NodeState) bool
- func AtomicStoreRTState(addr *NodeRTState, val NodeRTState)
- func AtomicStoreState(addr *NodeState, val NodeState)
- func NodeStateString(state NodeState) string
- type BufferType
- type Cleaner
- type DefaultIOHandle
- type IBufferHandle
- type INodeBuffer
- type INodeHandle
- type IOHandle
- type NodeRTState
- type NodeState
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NODE_HEAD_SIZE uint64 = 32 NODE_ALLOC_SIZE uint64 = 256 * 1024 NODE_DATA_SIZE = NODE_ALLOC_SIZE - NODE_HEAD_SIZE )
Functions ¶
func AtomicCASRTState ¶
func AtomicCASRTState(addr *NodeRTState, old, new NodeRTState) bool
func AtomicCASState ¶
func AtomicStoreRTState ¶
func AtomicStoreRTState(addr *NodeRTState, val NodeRTState)
func AtomicStoreState ¶
func NodeStateString ¶
Types ¶
type DefaultIOHandle ¶
type IBufferHandle ¶
type IBufferHandle interface {
io.Closer
GetID() uint64
GetHandle() INodeHandle
}
type INodeBuffer ¶
type INodeHandle ¶
type INodeHandle interface {
sync.Locker
io.Closer
GetID() uint64
GetNodeCreator() buf.MemoryNodeConstructor
Unload()
// Loadable() bool
Unloadable() bool
// GetBuff() buf.IBuffer
PrepareLoad() bool
RollbackLoad()
CommitLoad() error
MakeHandle() IBufferHandle
GetState() NodeState
GetCapacity() uint64
GetFile() common.IVFile
IsCompress() bool
// Size() uint64
// IsDestroyable() bool
IsClosed() bool
Ref()
// If the current RefCount is already 0, it returns false, else true
UnRef() bool
// If the current RefCount is not 0, it returns true, else false
HasRef() bool
SetBuffer(buffer buf.IBuffer) error
Iteration() uint64
IncIteration() uint64
GetBuffer() buf.IBuffer
IsSpillable() bool
Clean() error
String() string
}
type NodeRTState ¶
type NodeRTState = uint32
const ( NODE_RT_RUNNING NodeRTState = iota NODE_RT_CLOSED )
func AtomicLoadRTState ¶
func AtomicLoadRTState(addr *NodeRTState) NodeRTState
Click to show internal directories.
Click to hide internal directories.