com.alachisoft.jvcache.web.caching
Class CacheCollection

java.lang.Object
  extended by com.alachisoft.jvcache.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.


Constructor Summary
CacheCollection()
          Default Constructor
 
Method Summary
 void addCache(java.lang.String cacheId, Cache c)
           
 boolean contains(java.lang.String cacheId)
           
 Cache getCache(java.lang.String cacheId)
           
 java.util.Iterator<Cache> iterator()
           
 Cache removeCache(java.lang.String cacheId)
           
 int size()
           
 java.util.Collection values()
          Returns an enumeration of the components of this Collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheCollection

public CacheCollection()
Default Constructor

Method Detail

addCache

public void addCache(java.lang.String cacheId,
                     Cache c)
Parameters:
cacheId - Name of the cache
c - Cache instance

contains

public boolean contains(java.lang.String cacheId)
Parameters:
cacheId - Name of cache
Returns:
true if it exists

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

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>