Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

remove multiple entries from cache

778561Jul 26 2010 — edited Jul 27 2010
Hi,

Is there an efficient way to remove multiple (potentially many) entries from the cache.
Currently i am doing it the way as the code shows. But this sounds to be slow.
Is there a way to remove entries from the coherence map without bring back all the keys and then issue cache.remove() for each key from the client?


KeyExtractor extractor=new KeyExtractor("getSomeAttribute");
Filter filter = new EqualsFilter(extractor, attributeValue);

Set keyCol = cache_.keySet(filter);

Iterator iter = keyCol.iterator();
while (iter.hasNext()) {
Object item = iter.next();
cache_.remove(item);
}


Appreciate your help.
Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2010
Added on Jul 26 2010
1 comment
1,060 views