Package org.jppf.caching
Interface JPPFCollectionCache<E>
- Type Parameters:
E- the type of elements.
- All Known Implementing Classes:
JPPFSimpleSetCache
public interface JPPFCollectionCache<E>
Interface for caches implementations that rely on simple collections (as opposed to maps).
- Author:
- Laurent Cohen
-
Method Summary
-
Method Details
-
add
Put an element in the cache.- Parameters:
element- the element's key for retrival.
-
has
Determine whether an element is in the cache.- Parameters:
element- the element's to lookup.- Returns:
trueif the element is in the cache,falseotherwise.
-
remove
Remove an element from the cache.- Parameters:
element- the element to remove.- Returns:
- the the removed element if it was in the cache, or
nullif it wasn't.
-
clear
void clear()Clear the cache. This removes all elements from the cache.
-