MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / IntervalCache

Struct IntervalCache

pkg/util/cache/cache.go:535–546  ·  view source on GitHub ↗

IntervalCache is a cache which supports querying of intervals which match a key or range of keys. It is backed by an interval tree. See comments in UnorderedCache for more details on cache functionality. Note that the IntervalCache allow multiple identical segments, as specified by start and end ke

Source from the content-addressed store, hash-verified

533//
534// IntervalCache is not safe for concurrent access.
535type IntervalCache struct {
536 baseCache
537 tree interval.Tree
538 logErrorf IntervalCacheLogErrorf
539
540 // The fields below are used to avoid allocations during get, del and
541 // GetOverlaps.
542 getID uintptr
543 getEntry *Entry
544 overlapKey IntervalKey
545 overlaps []*Entry
546}
547
548// IntervalCacheLogErrorf is a hook that is called on certain errors in the IntervalCache.
549// This is used to prevent an import to util/log.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected