internal

package
v1.1.0-beta.0...-71e70af Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatsCacheInner

type StatsCacheInner interface {
	// Get gets the cache.
	Get(tid int64) (*statistics.Table, bool)
	// Put puts a cache.
	Put(tid int64, tbl *statistics.Table) bool
	// Del deletes a cache.
	Del(int64)
	// Cost returns the memory usage of the cache.
	Cost() int64
	// Values returns the values of the cache.
	Values() []*statistics.Table
	// Len returns the length of the cache.
	Len() int
	// Copy returns a copy of the cache
	Copy() StatsCacheInner
	// SetCapacity sets the capacity of the cache
	SetCapacity(int64)
	// Close stops the cache
	Close()
}

StatsCacheInner is the interface to manage the statsCache, it can be implemented by map, lru cache or other structures. TODO: this cache shouldn't be aware of *statistics.Table, e.g.

  1. change Put(int64, *stats.Table) to Put(k, v interface{}, vMem int64).
  2. remove remove the Version method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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