Lines Matching defs:version

6  * under the terms of the GNU General Public License version 2 only, as
14 * version 2 for more details (a copy is included in the LICENSE file that
17 * You should have received a copy of the GNU General Public License version
104 // invariant: e is null or an Entry with readable Entry.version and Entry.value
107 // The key fact that makes this work: if this.version == e.version,
114 // 4. the GC has somehow managed to delete e.version and clear the reference
226 // Try to make a real entry for the promised version.
227 e = makeEntry(e.version(), computeValue(type));
241 // racing e.version : null (blank) => unique Version token => null (GC-ed version)
242 // non-racing this.version : v1 => v2 => ... (updates are read faithfully from volatile)
243 return (e != null && e.get() == this.version);
244 // invariant: No false positives on version match. Null is OK for false negative.
245 // invariant: If version matches, then e.value is readable (final set in Entry.<init>)
274 * Current version for retrieving this class value from the cache.
275 * Any number of computeValue calls can be cached in association with one version.
276 * But the version changes when a remove (on any type) is executed.
277 * A version change invalidates all cache entries for the affected ClassValue,
284 * when this.version is bumped to a new token.
288 * If version were not volatile, one thread T1 could persistently hold onto
295 * The practical effect of making this.version be volatile is that it cannot
298 * before this.version.
300 private volatile Version<T> version = new Version<>(this);
301 Version<T> version() { return version; }
302 void bumpVersion() { version = new Version<>(this); }
309 boolean isLive() { return classValue.version() == this; }
315 * <li> else dead if version == null
316 * <li> else stale if version != classValue.version
325 Entry(Version<T> version, T value) {
326 super(version);
331 Entry(Version<T> version) {
332 super(version);
339 Version<T> version() { return get(); }
341 Version<T> v = version();
345 Version<T> v = version();
384 // Note that explicitVersion might be different from this.version.
392 // The entry and version fields themselves can be safely read via
394 // If the pointer from the entry to the version is still null,
395 // or if the version goes immediately dead and is nulled out,
431 Version<T> v = classValue.version();
442 if (e.version() != v) {
449 if (e.version() != v) {
451 // Once an entry is in the hash table, we don't care what its version is.
472 } else if (e0 != null && e0.isPromise() && e0.version() == e.version()) {
475 Version<T> v = classValue.version();
476 if (e.version() != v)
504 Version<T> version = classValue.version();
506 if (e0.version() == version && e0.value() == value)
507 // no value change => no version change needed
512 Entry<T> e = makeEntry(version, value);