@SuppressWarnings("unchecked") private Collection<Map.Entry<K, V>> getAllOrphanEntries(Collection<K> remoteKeys) { Collection<Map.Entry<K, V>> allEntries = new ArrayList<Map.Entry<K, V>>(); Collection<Map.Entry<K, V>> t = ((TCMap) data).__tc_getAllEntriesSnapshot(); allEntries.addAll(t); Iterator<Map.Entry<K, V>> iter = allEntries.iterator(); while (iter.hasNext()) { Map.Entry<K, V> entry = iter.next(); if (remoteKeys.contains(entry.getKey())) { iter.remove(); } } return allEntries; }
private Collection getAllOrphanEntries(Collection remoteKeys, int startEvictionIndex, int lastEvictionIndex) { Collection allEntries = new ArrayList(); for (int i = startEvictionIndex; i < lastEvictionIndex; i++) { Collection t = ((TCMap) store[i]).__tc_getAllEntriesSnapshot(); allEntries.addAll(t); } for (Iterator it = allEntries.iterator(); it.hasNext();) { Map.Entry e = (Map.Entry) it.next(); if (remoteKeys.contains(e.getKey())) { it.remove(); } } return allEntries; }
public Set keySet() { Set keySet = new HashSet(); for (int i = 0; i < config.getConcurrency(); i++) { Collection entrySnapshot = ((TCMap) store[i]).__tc_getAllEntriesSnapshot(); for (Iterator it = entrySnapshot.iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); keySet.add(entry.getKey()); } } return keySet; }
public Collection values() { List values = new ArrayList(); for (int i = 0; i < config.getConcurrency(); i++) { Collection entrySnapshot = ((TCMap) store[i]).__tc_getAllEntriesSnapshot(); for (Iterator it = entrySnapshot.iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); values.add(entry.getValue()); } } return values; }
Map<ObjectID, K> objectIDKeyMap = new HashMap<ObjectID, K>(); Collection<Map.Entry> collection = tcMap.__tc_getAllEntriesSnapshot(); for (Map.Entry entry : collection) {
Map<ObjectID, K> objectIDKeyMap = new HashMap<ObjectID, K>(); Collection<Map.Entry> collection = tcMap.__tc_getAllEntriesSnapshot(); for (Map.Entry entry : collection) {
@Override public Set<?> getKeysForOrphanedValues(final TCMap tcMap) { final Collection<Map.Entry> allEntries = tcMap.__tc_getAllEntriesSnapshot();
@Override public Set<?> getKeysForOrphanedValues(final TCMap tcMap) { final Collection<Map.Entry> allEntries = tcMap.__tc_getAllEntriesSnapshot();