Package org.jppf.caching
Class JPPFSimpleSetCache<E>
java.lang.Object
org.jppf.caching.JPPFSimpleSetCache<E>
- Type Parameters:
E- the type of the cache elements.
- All Implemented Interfaces:
JPPFCollectionCache<E>
Cache implementation backed by a
Set wihh synchronized access.- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JPPFSimpleSetCache
public JPPFSimpleSetCache()
-
-
Method Details
-
add
Description copied from interface:JPPFCollectionCachePut an element in the cache.- Specified by:
addin interfaceJPPFCollectionCache<E>- Parameters:
element- the element's key for retrival.
-
has
Description copied from interface:JPPFCollectionCacheDetermine whether an element is in the cache.- Specified by:
hasin interfaceJPPFCollectionCache<E>- Parameters:
element- the element's to lookup.- Returns:
trueif the element is in the cache,falseotherwise.
-
remove
Description copied from interface:JPPFCollectionCacheRemove an element from the cache.- Specified by:
removein interfaceJPPFCollectionCache<E>- Parameters:
element- the element to remove.- Returns:
- the the removed element if it was in the cache, or
nullif it wasn't.
-
clear
public void clear()Description copied from interface:JPPFCollectionCacheClear the cache. This removes all elements from the cache.- Specified by:
clearin interfaceJPPFCollectionCache<E>
-