Package net.sf.ehcache.store
Class CacheKeySet<E>
- java.lang.Object
-
- net.sf.ehcache.store.CacheKeySet<E>
-
- Type Parameters:
E- the type of elements maintained by this set
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.Set<E>
public class CacheKeySet<E> extends java.lang.Object implements java.util.Set<E>A Set of keys that will encapsulate keys present in a Cache. It will mostly behave as an immutableSet, but for itssize()method- Author:
- Alex Snaps
-
-
Constructor Summary
Constructors Constructor Description CacheKeySet(java.util.Collection<E>... keySets)Create a new Set for all tiers in the cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.Object o)You can't add to this set, will throw!booleanaddAll(java.util.Collection c)You can't add to this set, will throw!voidclear()You can't remove from this set, will throw!booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanisEmpty()java.util.Iterator<E>iterator()booleanremove(java.lang.Object o)You can't remove from this set, will throw!booleanremoveAll(java.util.Collection<?> c)You can't remove from this set, will throw!booleanretainAll(java.util.Collection<?> c)You can't remove from this set, will throw!intsize()Sums the size of all sets wrapped by this one, so this will not account for duplicated keys.java.lang.Object[]toArray()<T> T[]toArray(T[] a)
-
-
-
Constructor Detail
-
CacheKeySet
public CacheKeySet(java.util.Collection<E>... keySets)
Create a new Set for all tiers in the cache. Generally, you'd pass the authority's keySet, and higher layer pinned keySets- Parameters:
keySets- an array of keySets
-
-
Method Detail
-
size
public int size()
Sums the size of all sets wrapped by this one, so this will not account for duplicated keys. Like for in-memory pinned keys, that might also present in lower tiers: e.g. DiskStore when its capacity isn't reached.
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<E> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(java.lang.Object o)
You can't add to this set, will throw!
-
remove
public boolean remove(java.lang.Object o)
You can't remove from this set, will throw!
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection c)
You can't add to this set, will throw!
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
You can't remove from this set, will throw!
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
You can't remove from this set, will throw!
-
-