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; }
@SuppressWarnings("unchecked") private Collection<Map.Entry<K, V>> getAllLocalEntries() { Collection<Map.Entry<K, V>> allLocalEntries = new ArrayList<Map.Entry<K, V>>(); Collection<Map.Entry<K, V>> t = ((TCMap) data).__tc_getAllLocalEntriesSnapshot(); allLocalEntries.addAll(t); return allLocalEntries; }
private void expire(Object key) { Assert.pre(key != null); ((TCMap) data).__tc_remove_logical(key); ((TCMap) timestamps).__tc_remove_logical(key); }
((TCMap) m).__tc_applicator_put(pkey, value); } else { m.put(pkey, value); ((TCMap) m).__tc_applicator_remove(rkey); } else { m.remove(rkey); case SerializationUtil.CLEAR: if (m instanceof TCMap) { ((TCMap) m).__tc_applicator_clear(); } else { m.clear();
public void putData(final Object key, final Element value) { if(config.isLoggingEnabled()) { logger.info("PutData [" + key + ", " + value + "]"); } if (key == null) { Assert.fail("Cannot add cache element with null key"); } if (value == null) { Assert.fail("Cannot add cache element with null value"); } int storeIndex = getStoreIndex(key); ((TCMap) store[storeIndex]).__tc_put_logical(key, value); updateExpireTime(key, value); }
((TCMap) m).__tc_applicator_put(pkey, value); } else { m.put(pkey, value); ((TCMap) m).__tc_applicator_remove(rkey); } else { m.remove(rkey); case SerializationUtil.CLEAR: if (m instanceof TCMap) { ((TCMap) m).__tc_applicator_clear(); } else { m.clear();
@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 getAllLocalEntries(int startEvictionIndex, int lastEvictionIndex) { Collection allLocalEntries = new ArrayList(); for (int i = startEvictionIndex; i < lastEvictionIndex; i++) { Collection t = ((TCMap) store[i]).__tc_getAllLocalEntriesSnapshot(); allLocalEntries.addAll(t); } return allLocalEntries; }
private void removeInternal(final Object key) { if(key == null) { Assert.fail("Cannot remove cache element with null key"); } int storeIndex = getStoreIndex(key); Object lock = locks[storeIndex]; ManagerUtil.monitorEnter(lock, writeLockLevel); try { ((TCMap) store[storeIndex]).__tc_remove_logical(key); ((TCMap) dtmStore[storeIndex]).__tc_remove_logical(key); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
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();