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.
- change Put(int64, *stats.Table) to Put(k, v interface{}, vMem int64).
- remove remove the Version method.
Click to show internal directories.
Click to hide internal directories.