Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.opensymphony.oscache.base.algorithm
Class UnlimitedCache

    java.lang.Object
      java.util.AbstractMap
          com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
              com.opensymphony.oscache.base.algorithm.UnlimitedCache

All Implemented Interfaces:
  java.lang.Cloneable, java.util.Map, java.io.Serializable

public final class UnlimitedCache
extends AbstractConcurrentReadCache

A simple unlimited cache that has no upper bound to the number of cache entries it can contain.

Version:
  $Revision: 1.1 $
Author:
  Francois Beauregard, Alain Bergevin
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
`AbstractConcurrentReadCache.Entry, AbstractConcurrentReadCache.HashIterator, AbstractConcurrentReadCache.KeyIterator, AbstractConcurrentReadCache.ValueIterator`

Field Summary

Fields inherited from class com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
`barrierLock, count, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_MAX_ENTRIES, entrySet, groups, keySet, lastWrite, loadFactor, log, maxEntries, memoryCaching, NULL, persistenceListener, table, threshold, UNLIMITED, unlimitedDiskCache, values`

Constructor Summary
`UnlimitedCache()` Creates an unlimited cache by calling the super class's constructor with an `UNLIMITED` maximum number of entries.

Method Summary
`protected void` | `itemPut(java.lang.Object key)` Implements `itemPut` with an empty implementation.
`protected void` | `itemRemoved(java.lang.Object key)` An empty implementation.
`protected void` | `itemRetrieved(java.lang.Object key)` Implements `itemRetrieved` with an empty implementation.
`protected java.lang.Object` | `removeItem()` This method just returns `null` since items should never end up being removed from an unlimited cache!
`void` | `setMaxEntries(int maxEntries)` Overrides the `setMaxEntries` with an empty implementation.

Methods inherited from class com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
`capacity, clear, clone, contains, containsKey, containsValue, elements, entrySet, findAndRemoveEntry, get, getGroup, getGroupsForReading, getMaxEntries, getPersistenceListener, getTableForReading, isEmpty, isMemoryCaching, isUnlimitedDiskCache, keys, keySet, loadFactor, persistClear, persistRemove, persistRemoveGroup, persistRetrieve, persistRetrieveGroup, persistStore, persistStoreGroup, put, putAll, readObject, recordModification, rehash, remove, setMemoryCaching, setPersistenceListener, setUnlimitedDiskCache, size, sput, sremove, values, writeObject`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### UnlimitedCache

    public UnlimitedCache()

  Creates an unlimited cache by calling the super class's constructor with an `UNLIMITED` maximum number of entries.

Method Detail

### setMaxEntries

    public void setMaxEntries(int maxEntries)

  Overrides the `setMaxEntries` with an empty implementation. This property cannot be modified and is ignored for an `UnlimitedCache`.

  Overrides:
    `setMaxEntries` in class `AbstractConcurrentReadCache`

### itemRetrieved

    protected void itemRetrieved(java.lang.Object key)

  Implements `itemRetrieved` with an empty implementation. The unlimited cache doesn't care that an item was retrieved.

  Specified by:
    `itemRetrieved` in class `AbstractConcurrentReadCache`
  Parameters:
    `key` - The cache key of the item that was retrieved.

### itemPut

    protected void itemPut(java.lang.Object key)

  Implements `itemPut` with an empty implementation. The unlimited cache doesn't care that an item was put in the cache.

  Specified by:
    `itemPut` in class `AbstractConcurrentReadCache`
  Parameters:
    `key` - The cache key of the item that was put.

### removeItem

    protected java.lang.Object removeItem()

  This method just returns `null` since items should never end up being removed from an unlimited cache!

  Specified by:
    `removeItem` in class `AbstractConcurrentReadCache`
  Returns:
    The key of whichever item was removed.

### itemRemoved

    protected void itemRemoved(java.lang.Object key)

  An empty implementation. The unlimited cache doesn't care that an item was removed.

  Specified by:
    `itemRemoved` in class `AbstractConcurrentReadCache`
  Parameters:
    `key` - The cache key of the item that was removed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| See www.opensymphony.com for more information.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD