Home | History | Annotate | Download | only in core

Lines Matching defs:Rec

74     struct Rec {
77 Rec() {}
78 virtual ~Rec() {}
85 // Called if the cache needs to purge/remove/delete the Rec. Default returns true.
90 // A rec is first created/initialized, and then added to the cache. As part of the add(),
91 // the cache will callback into the rec with postAddInstall, passing in whatever payload
95 // the new rec (if an existing rec in the cache has the same key and cannot be purged).
96 // If the new rec will be deleted during add, the pre-existing one (with the same key)
106 Rec* fNext;
107 Rec* fPrev;
119 typedef const Rec* ID;
123 * specified Key, and will pass in the corresponding Rec, along with a caller-specified
124 * context. The function can read the data in Rec, and copy whatever it likes into context
127 * The return value determines what the cache will do with the Rec. If the function returns
128 * true, then the Rec is considered "valid". If false is returned, the Rec will be considered
131 typedef bool (*FindVisitor)(const Rec&, void* context);
150 * true : Rec is valid
151 * false : Rec is "stale" -- the cache will purge it.
154 static void Add(Rec*, void* payload = nullptr);
156 typedef void (*Visitor)(const Rec&, void* context);
157 // Call the visitor for every Rec in the cache.
172 /** Dump memory usage statistics of every Rec in the cache using the
217 * true : Rec is valid
218 * false : Rec is "stale" -- the cache will purge it.
221 void add(Rec*, void* payload = nullptr);
261 Rec* fHead;
262 Rec* fTail;
280 void moveToHead(Rec*);
281 void addToHead(Rec*);
282 void release(Rec*);
283 void remove(Rec*);