Home | History | Annotate | Download | only in base

Lines Matching refs:entry

115   Entry* entry = GetOrCreateEntry(id, true);
116 if (LS_LOCKED == entry->lock_state)
118 if ((LS_UNLOCKED == entry->lock_state) && (entry->accessors > 0))
124 entry->lock_state = LS_LOCKED;
129 Entry* entry = GetOrCreateEntry(id, false);
130 if (LS_LOCKED != entry->lock_state)
136 ASSERT(previous_size <= entry->size);
137 if (previous_size > entry->size) {
138 previous_size = entry->size;
147 entry->streams = stdmax(entry->streams, index + 1);
148 entry->size -= previous_size;
151 entry->accessors += 1;
157 Entry* entry = GetOrCreateEntry(id, false);
158 if (LS_LOCKED != entry->lock_state)
161 if (entry->accessors > 0) {
162 entry->lock_state = LS_UNLOCKING;
164 entry->lock_state = LS_UNLOCKED;
165 entry->last_modified = time(0);
173 const Entry* entry = GetEntry(id);
174 if (LS_UNLOCKED != entry->lock_state)
176 if (index >= entry->streams)
183 entry->accessors += 1;
189 const Entry* entry = GetEntry(id);
190 return (NULL != entry) && (entry->streams > 0);
194 const Entry* entry = GetEntry(id);
195 if ((NULL == entry) || (index >= entry->streams))
204 Entry* entry = GetOrCreateEntry(id, false);
205 if (!entry)
208 if ((LS_UNLOCKED != entry->lock_state) || (entry->accessors > 0))
212 for (size_t index = 0; index < entry->streams; ++index) {
224 total_size_ -= entry->size;
314 DiskCache::Entry* DiskCache::GetOrCreateEntry(const std::string& id,
321 Entry e;
332 const Entry* entry = GetEntry(id);
333 if (!entry) {
334 LOG_F(LS_WARNING) << "Missing cache entry";
339 entry->accessors -= 1;
342 if (LS_UNLOCKED != entry->lock_state) {
346 Entry* entry2 = this2->GetOrCreateEntry(id, false);
354 if ((LS_UNLOCKING == entry->lock_state) && (0 == entry->accessors)) {