org.norther.tammi.core.cache
Interface Cache
- All Superinterfaces:
- CachedMap, ConcurrentMap, Map
- All Known Subinterfaces:
- ResourceCache, SessionManager, SharedCache
- All Known Implementing Classes:
- DefaultCache, DefaultResourceCache, DefaultSessionManager, DefaultSharedCache
public interface Cache
- extends CachedMap
Extends ReferableMap to support expiration of old entries. The
map has a default expiration time, which is used for objects put into the map
without an explicit expiration frequency. The maximum expiration time
specifies the longest possible expiration time for the map. Its value may
affect the performance of the map and should be realistic. Expired entries
are searched at regular intervals specified by the expiration sleep interval.
All times are given in seconds. The value -1 indicates always infinite time.
The expiration time of an entry is automatically refreshed when it is got
from the map. However, iterators do not need to refresh entries accessed
through them.
The maximum number of entries accepted by the map can be specified with max
entries. The oldest entries above the limit will be expired indepently on
their expiration time. The limit need not to be strict during puts but
maintained by the expiration handler.
Note that the size of the map and its sets and collections is not constant in
time as entries expire dynamically. Iterators can return expired entries if
there is a pause between calls to the hasNext and next methods.
- Author:
- Ilkka Priha
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from interface org.norther.tammi.acorn.cache.CachedMap |
add, add, expire, expireAll, expireFraction, get, getDefaultExpirationTime, getExpirationLimit, getExpirationSleepInterval, getExpirationThreshold, getMaxExpirationTime, isAllowExpired, isAutoRefreshDeclined, isDiscardOverloaded, put, putIfAbsent, refresh, refresh, setAllowExpired, setAutoRefreshDeclined, setDefaultExpirationTime, setDiscardOverloaded, setExpirationLimit, setExpirationSleepInterval, setExpirationThreshold, setMaxExpirationTime |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Copyright © 2004 The Norther Organization. All rights reserved.