com.alachisoft.ncache.web.caching
Class CacheCollection
java.lang.Object
com.alachisoft.ncache.web.caching.CacheCollection
- All Implemented Interfaces:
- java.lang.Iterable<Cache>
public class CacheCollection
- extends java.lang.Object
- implements java.lang.Iterable<Cache>
List of all the caches.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheCollection
public CacheCollection()
- Default Constructor
addCache
public void addCache(java.lang.String cacheId,
Cache c)
- Parameters:
cacheId
- Name of the cachec
- Cache instance
contains
public boolean contains(java.lang.String cacheId)
- Parameters:
cacheId
- Name of cache
- Returns:
- true if it exists
getCache
public Cache getCache(java.lang.String cacheId)
- Parameters:
cacheId
- Name of cache
- Returns:
- Cache instance
iterator
public java.util.Iterator<Cache> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<Cache>
removeCache
public Cache removeCache(java.lang.String cacheId)
- Parameters:
cacheId
- Name of the cache
- Returns:
- Cache instance
size
public int size()
- Returns:
- Number of caches
values
public java.util.Collection values()
- Returns an enumeration of the components of this Collection. The
returned Enumeration object will generate all items in
this vector. The first item generated is the item at index 0,
then the item at index 1, and so on.
- Returns:
- an enumeration of the components of this vector.
- See Also:
Enumeration
,
Iterator