Documentation ¶
Index ¶
- Variables
- type AbstractAggregatedMemoryContext
- type AggregatedMemoryContext
- type ChildAggregatedMemoryContext
- func (at *ChildAggregatedMemoryContext) Close()
- func (at *ChildAggregatedMemoryContext) GetBytes() int64
- func (at *ChildAggregatedMemoryContext) NewAggregatedMemoryContext() AggregatedMemoryContext
- func (at *ChildAggregatedMemoryContext) NewLocalMemoryContext(allocationTag string) LocalMemoryContext
- type LocalMemoryContext
- type SimpleAggregatedMemoryContext
- func (at *SimpleAggregatedMemoryContext) Close()
- func (at *SimpleAggregatedMemoryContext) GetBytes() int64
- func (at *SimpleAggregatedMemoryContext) NewAggregatedMemoryContext() AggregatedMemoryContext
- func (at *SimpleAggregatedMemoryContext) NewLocalMemoryContext(allocationTag string) LocalMemoryContext
- type SimpleLocalMemoryContext
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FORCE_FREE_TAG string = "FORCE_FREE_OPERATION"
)
Functions ¶
This section is empty.
Types ¶
type AbstractAggregatedMemoryContext ¶
type AbstractAggregatedMemoryContext struct { // 继承 AggregatedMemoryContext // contains filtered or unexported fields }
type AggregatedMemoryContext ¶
type AggregatedMemoryContext interface { GetBytes() int64 Close() NewAggregatedMemoryContext() AggregatedMemoryContext NewLocalMemoryContext(allocationTag string) LocalMemoryContext // contains filtered or unexported methods }
type ChildAggregatedMemoryContext ¶
type ChildAggregatedMemoryContext struct { // 继承 AbstractAggregatedMemoryContext // contains filtered or unexported fields }
func NewChildAggregatedMemoryContext ¶
func NewChildAggregatedMemoryContext(parentMemoryContext AggregatedMemoryContext) *ChildAggregatedMemoryContext
func (*ChildAggregatedMemoryContext) Close ¶
func (at *ChildAggregatedMemoryContext) Close()
@Override synchronized
func (*ChildAggregatedMemoryContext) GetBytes ¶
func (at *ChildAggregatedMemoryContext) GetBytes() int64
@Override synchronized
func (*ChildAggregatedMemoryContext) NewAggregatedMemoryContext ¶
func (at *ChildAggregatedMemoryContext) NewAggregatedMemoryContext() AggregatedMemoryContext
@Override
func (*ChildAggregatedMemoryContext) NewLocalMemoryContext ¶
func (at *ChildAggregatedMemoryContext) NewLocalMemoryContext(allocationTag string) LocalMemoryContext
@Override
type LocalMemoryContext ¶
type LocalMemoryContext interface { GetBytes() int64 /** * When this method returns, the bytes tracked by this LocalMemoryContext has been updated. * The returned future will tell the caller whether it should block before reserving more memory * (which happens when the memory pools are low on memory). * <p/> * Note: Canceling the returned future will complete it immediately even though the memory pools are low * on memory, and callers blocked on this future will proceed to allocating more memory from the exhausted * pools, which will violate the protocol of Moth MemoryPool implementation. */ SetBytes(bytes int64) /** * This method can return false when there is not enough memory available to satisfy a positive delta allocation * ({@code bytes} is greater than the bytes tracked by this LocalMemoryContext). * <p/> * * @return true if the bytes tracked by this LocalMemoryContext can be set to {@code bytes}. */ TrySetBytes(bytes int64) bool /** * Closes this LocalMemoryContext. Once closed the bytes tracked by this LocalMemoryContext will be set to 0, and * none of its methods (except {@code getBytes()}) can be called. */ Close() }
type SimpleAggregatedMemoryContext ¶
type SimpleAggregatedMemoryContext struct { // 继承 AbstractAggregatedMemoryContext }
func NewSimpleAggregatedMemoryContext ¶
func NewSimpleAggregatedMemoryContext() *SimpleAggregatedMemoryContext
func (*SimpleAggregatedMemoryContext) Close ¶
func (at *SimpleAggregatedMemoryContext) Close()
@Override synchronized
func (*SimpleAggregatedMemoryContext) GetBytes ¶
func (at *SimpleAggregatedMemoryContext) GetBytes() int64
@Override synchronized
func (*SimpleAggregatedMemoryContext) NewAggregatedMemoryContext ¶
func (at *SimpleAggregatedMemoryContext) NewAggregatedMemoryContext() AggregatedMemoryContext
@Override
func (*SimpleAggregatedMemoryContext) NewLocalMemoryContext ¶
func (at *SimpleAggregatedMemoryContext) NewLocalMemoryContext(allocationTag string) LocalMemoryContext
@Override
type SimpleLocalMemoryContext ¶
type SimpleLocalMemoryContext struct { LocalMemoryContext // contains filtered or unexported fields }
func NewSimpleLocalMemoryContext ¶
func NewSimpleLocalMemoryContext(parentMemoryContext AggregatedMemoryContext, allocationTag string) *SimpleLocalMemoryContext
func (*SimpleLocalMemoryContext) GetBytes ¶
func (st *SimpleLocalMemoryContext) GetBytes() int64
@Override
func (*SimpleLocalMemoryContext) SetBytes ¶
func (st *SimpleLocalMemoryContext) SetBytes(bytes int64)
@Override
func (*SimpleLocalMemoryContext) TrySetBytes ¶
func (st *SimpleLocalMemoryContext) TrySetBytes(bytes int64) bool
@Override
Click to show internal directories.
Click to hide internal directories.