Home | History | Annotate | Download | only in cache

Lines Matching refs:hash

424         int hash = map.hash(key);
427 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
480 int hash = map.hash(key);
482 int index = hash & (table.length() - 1);
484 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
509 int hash = map.hash(key);
511 int index = hash & (table.length() - 1);
513 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
570 int hash = map.hash(one);
571 int index = hash & (table.length() - 1);
603 ReferenceEntry<Object, Object> entry = segment.getEntry(one, hash);
707 int hash = map.hash(key);
709 int index = hash & (table.length() - 1);
712 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
717 assertNull(segment.refresh(key, hash, identityLoader()));
809 int hash = map.hash(one);
810 ReferenceEntry<Object, Object> entry = segment.getEntry(one, hash);
884 int hashOne = map.hash(keyOne);
897 int hashTwo = map.hash(keyTwo);
916 int hashOne = map.hash(keyOne);
922 int hashTwo = map.hash(keyTwo);
969 int hash = map.hash(key);
972 int index = hash & (table.length() - 1);
974 ReferenceEntry<Object, Object> entry = map.newEntry(key, hash, null);
978 assertNull(segment.get(key, hash));
982 assertNull(segment.get(key, hash));
983 assertFalse(segment.containsKey(key, hash));
988 assertSame(value, segment.get(key, hash));
989 assertTrue(segment.containsKey(key, hash));
992 assertNull(segment.get(new Object(), hash));
995 DummyEntry<Object, Object> nullEntry = DummyEntry.create(null, hash, entry);
1001 assertSame(value, segment.get(key, hash));
1002 assertTrue(segment.containsKey(key, hash));
1006 // hash collision
1007 DummyEntry<Object, Object> dummy = DummyEntry.create(new Object(), hash, entry);
1012 assertSame(value, segment.get(key, hash));
1013 assertTrue(segment.containsKey(key, hash));
1018 dummy = DummyEntry.create(key, hash, entry);
1024 assertSame(dummyValue, segment.get(key, hash));
1025 assertTrue(segment.containsKey(key, hash));
1031 assertNull(segment.get(key, hash));
1032 assertFalse(segment.containsKey(key, hash));
1044 int hash = map.hash(key);
1048 int index = hash & (table.length() - 1);
1050 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1055 assertFalse(segment.replace(key, hash, oldValue, newValue));
1062 assertSame(oldValue, segment.get(key, hash));
1063 assertTrue(segment.replace(key, hash, oldValue, newValue));
1065 assertSame(newValue, segment.get(key, hash));
1068 assertFalse(segment.replace(key, hash, oldValue, newValue));
1070 assertSame(newValue, segment.get(key, hash));
1074 assertSame(oldValue, segment.get(key, hash));
1076 assertFalse(segment.replace(key, hash, oldValue, newValue));
1078 assertNull(segment.get(key, hash));
1088 int hash = map.hash(key);
1092 int index = hash & (table.length() - 1);
1094 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1099 assertNull(segment.replace(key, hash, newValue));
1106 assertSame(oldValue, segment.get(key, hash));
1107 assertSame(oldValue, segment.replace(key, hash, newValue));
1109 assertSame(newValue, segment.get(key, hash));
1113 assertSame(oldValue, segment.get(key, hash));
1115 assertNull(segment.replace(key, hash, newValue));
1117 assertNull(segment.get(key, hash));
1127 int hash = map.hash(key);
1133 assertNull(segment.put(key, hash, oldValue, false));
1137 assertSame(oldValue, segment.put(key, hash, newValue, false));
1139 assertSame(newValue, segment.get(key, hash));
1142 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
1145 assertSame(oldValue, segment.get(key, hash));
1147 assertNull(segment.put(key, hash, newValue, false));
1149 assertSame(newValue, segment.get(key, hash));
1159 int hash = map.hash(key);
1165 assertNull(segment.put(key, hash, oldValue, true));
1169 assertSame(oldValue, segment.put(key, hash, newValue, true));
1171 assertSame(oldValue, segment.get(key, hash));
1174 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
1177 assertSame(oldValue, segment.get(key, hash));
1179 assertNull(segment.put(key, hash, newValue, true));
1181 assertSame(newValue, segment.get(key, hash));
1194 int hash = map.hash(key);
1195 assertNull(segment.put(key, hash, value, false));
1230 int hash = map.hash(key);
1232 int index = hash & (table.length() - 1);
1234 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1242 assertNull(segment.get(key, hash));
1243 assertTrue(segment.storeLoadedValue(key, hash, valueRef, value));
1244 assertSame(value, segment.get(key, hash));
1250 assertFalse(segment.storeLoadedValue(key, hash, valueRef, value2));
1252 assertSame(value, segment.get(key, hash));
1264 assertTrue(segment.storeLoadedValue(key, hash, valueRef, value3));
1265 assertSame(value3, segment.get(key, hash));
1275 assertSame(value3, segment.get(key, hash));
1277 assertTrue(segment.storeLoadedValue(key, hash, valueRef, value4));
1278 assertSame(value4, segment.get(key, hash));
1288 assertSame(value3, segment.get(key, hash));
1291 assertTrue(segment.storeLoadedValue(key, hash, valueRef, value4));
1292 assertSame(value4, segment.get(key, hash));
1305 int hash = map.hash(key);
1308 int index = hash & (table.length() - 1);
1310 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1316 assertNull(segment.remove(key, hash));
1323 assertSame(oldValue, segment.get(key, hash));
1324 assertSame(oldValue, segment.remove(key, hash));
1326 assertNull(segment.get(key, hash));
1332 assertSame(oldValue, segment.get(key, hash));
1334 assertNull(segment.remove(key, hash));
1336 assertNull(segment.get(key, hash));
1344 int hash = map.hash(key);
1348 int index = hash & (table.length() - 1);
1350 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1356 assertNull(segment.remove(key, hash));
1363 assertSame(oldValue, segment.get(key, hash));
1364 assertTrue(segment.remove(key, hash, oldValue));
1366 assertNull(segment.get(key, hash));
1372 assertSame(oldValue, segment.get(key, hash));
1373 assertFalse(segment.remove(key, hash, newValue));
1375 assertSame(oldValue, segment.get(key, hash));
1378 assertSame(oldValue, segment.get(key, hash));
1380 assertFalse(segment.remove(key, hash, oldValue));
1382 assertNull(segment.get(key, hash));
1397 int hash = map.hash(key);
1399 entry = map.newEntry(key, hash, entry);
1435 int hashOne = map.hash(keyOne);
1439 int hashTwo = map.hash(keyTwo);
1443 int hashThree = map.hash(keyThree);
1479 int hashOne = map.hash(keyOne);
1483 int hashTwo = map.hash(keyTwo);
1487 int hashThree = map.hash(keyThree);
1529 int hash = map.hash(key);
1534 entry = DummyEntry.create(key, hash, entry);
1587 int hash = map.hash(key);
1588 DummyEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1622 int hash = map.hash(key);
1623 DummyEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1657 int hash = map.hash(key);
1658 DummyEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1661 assertFalse(segment.removeEntry(entry, hash, RemovalCause.COLLECTED));
1667 assertTrue(segment.removeEntry(entry, hash, RemovalCause.COLLECTED));
1668 assertNotificationEnqueued(map, key, value, hash);
1691 int hash = map.hash(key);
1692 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1697 assertFalse(segment.reclaimValue(key, hash, valueRef));
1703 assertTrue(segment.reclaimValue(key, hash, valueRef));
1717 assertFalse(segment.reclaimValue(key, hash, valueRef));
1719 assertTrue(segment.reclaimValue(key, hash, otherValueRef));
1737 int hash = map.hash(key);
1738 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1743 assertFalse(segment.removeLoadingValue(key, hash, valueRef));
1748 assertTrue(segment.removeLoadingValue(key, hash, valueRef));
1761 assertTrue(segment.removeLoadingValue(key, hash, valueRef));
1763 assertSame(value, segment.get(key, hash));
1769 assertFalse(segment.removeLoadingValue(key, hash, valueRef));
1771 assertTrue(segment.removeLoadingValue(key, hash, valueRef));
1775 LocalCache<K, V> map, K key, V value, int hash) {
1860 int hash = map.hash(key);
1863 ReferenceEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1901 int hash = map.hash(key);
1905 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
1943 int hash = map.hash(key);
1946 ReferenceEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
2144 int hash = map.hash(key);
2145 int index = hash & (table.length() - 1);
2147 entry = map.newEntry(key, hash, first);
2179 int hashOne = map.hash(keyOne);
2209 int hashOne = map.hash(keyOne);
2240 int hashOne = map.hash(keyOne);
2271 int hashOne = map.hash(keyOne);
2472 K key, int hash, V value, ReferenceEntry<K, V> next) {
2473 DummyEntry<K, V> entry = DummyEntry.create(key, hash, next);
2481 private final int hash;
2484 public DummyEntry(K key, int hash, ReferenceEntry<K, V> next) {
2486 this.hash = hash;
2490 public static <K, V> DummyEntry<K, V> create(K key, int hash, ReferenceEntry<K, V> next) {
2491 return new DummyEntry<K, V>(key, hash, next);
2517 return hash;