Serialized Form
|
Package com.opensymphony.oscache.base |
config
Config config
listenerList
EventListenerList listenerList
- Holds a list of all the registered event listeners. Event listeners are specified
using the
AbstractCacheAdministrator.CACHE_ENTRY_EVENT_LISTENERS_KEY configuration key.
algorithmClass
String algorithmClass
- The algorithm class being used, as specified by the
AbstractCacheAdministrator.CACHE_ALGORITHM_KEY
configuration property.
cacheCapacity
int cacheCapacity
- The cache capacity (number of entries), as specified by the
AbstractCacheAdministrator.CACHE_CAPACITY_KEY
configuration property.
blocking
boolean blocking
- Whether the cache blocks waiting for content to be build, or serves stale
content instead. This value can be specified using the
AbstractCacheAdministrator.CACHE_BLOCKING_KEY
configuration property.
memoryCaching
boolean memoryCaching
- Whether or not to store the cache entries in memory. This is configurable using the
AbstractCacheAdministrator.CACHE_MEMORY_KEY property.
overflowPersistence
boolean overflowPersistence
- Whether the persistent cache should be used immediately or only when the memory capacity
has been reached, ie. overflow only.
This can be set via the
AbstractCacheAdministrator.CACHE_PERSISTENCE_OVERFLOW_KEY configuration property.
unlimitedDiskCache
boolean unlimitedDiskCache
- Whether the disk cache should be unlimited in size, or matched 1-1 to the memory cache.
This can be set via the
AbstractCacheAdministrator.CACHE_DISK_UNLIMITED_KEY configuration property.
listenerList
EventListenerList listenerList
- A list of all registered event listeners for this cache.
cacheMap
AbstractConcurrentReadCache cacheMap
- The actual cache map. This is where the cached objects are held.
flushDateTime
Date flushDateTime
- Date of last complete cache flush.
updateStates
Map<K,V> updateStates
- A map that holds keys of cache entries that are currently being built, and EntryUpdateState instance as values. This is used to coordinate threads
that modify/access a same key in concurrence.
The cache checks against this map when a stale entry is requested, or a cache miss is observed.
If the requested key is in here, we know the entry is currently being
built by another thread and hence we can either block and wait or serve
the stale entry (depending on whether cache blocking is enabled or not).
To avoid data races, values in this map should remain present during the whole time distinct threads deal with the
same key. We implement this using explicit reference counting in the EntryUpdateState instance, to be able to clean up
the map once all threads have declared they are done accessing/updating a given key.
It is not possible to locate this into the CacheEntry because this would require to have a CacheEntry instance for all cache misses, and
may therefore generate a memory leak. More over, the CacheEntry instance may not be hold in memory in the case no
memory cache is configured.
blocking
boolean blocking
- Indicates whether the cache blocks requests until new content has
been generated or just serves stale content instead.
policy
EntryRefreshPolicy policy
- The entry refresh policy object to use for this cache entry. This is optional.
content
Object content
- The actual content that is being cached. Wherever possible this object
should be serializable. This allows
PersistenceListeners
to serialize the cache entries to disk or database.
groups
Set<E> groups
- The set of cache groups that this cache entry belongs to, if any.
key
String key
- The unique cache key for this entry
wasFlushed
boolean wasFlushed
true if this entry was flushed
created
long created
- The time this entry was created.
lastUpdate
long lastUpdate
- The time this emtry was last updated.
properties
Properties properties
- Properties map to hold the cache configuration.
cacheContent
Object cacheContent
- Current object in the cache
|
Package com.opensymphony.oscache.base.algorithm |
readObject
private void readObject(ObjectInputStream s)
throws IOException,
ClassNotFoundException
- Reconstitute the AbstractConcurrentReadCache.
instance from a stream (i.e.,
deserialize it).
- Throws:
IOException
ClassNotFoundException
writeObject
private void writeObject(ObjectOutputStream s)
throws IOException
- Save the state of the AbstractConcurrentReadCache instance to a stream.
(i.e., serialize it).
- Serial Data:
- The capacity of the
AbstractConcurrentReadCache (the length of the
bucket array) is emitted (int), followed by the
size of the AbstractConcurrentReadCache (the number of key-value
mappings), followed by the key (Object) and value (Object)
for each key-value mapping represented by the AbstractConcurrentReadCache
The key-value mappings are emitted in no particular order.
- Throws:
IOException
barrierLock
Boolean barrierLock
- Lock used only for its memory effects. We use a Boolean
because it is serializable, and we create a new one because
we need a unique object for each cache instance.
memoryCaching
boolean memoryCaching
- Use memory cache or not.
unlimitedDiskCache
boolean unlimitedDiskCache
- Use unlimited disk caching.
loadFactor
float loadFactor
- The load factor for the hash table.
-
DEFAULT_MAX_ENTRIES
int DEFAULT_MAX_ENTRIES
- Default cache capacity (number of entries).
UNLIMITED
int UNLIMITED
- Max number of element in cache when considered unlimited.
groups
HashMap<K,V> groups
- A HashMap containing the group information.
Each entry uses the group name as the key, and holds a
Set of containing keys of all
the cache entries that belong to that particular group.
maxEntries
int maxEntries
- Cache capacity (number of entries).
threshold
int threshold
- The table is rehashed when its size exceeds this threshold.
(The value of this field is always (int)(capacity * loadFactor).)
-
overflowPersistence
boolean overflowPersistence
- Use overflow persistence caching.
serialVersionUID: -10333778645392679L
list
Collection<E> list
- A queue containing all cache keys
serialVersionUID: -7379608101794788534L
list
Collection<E> list
- Cache queue containing all cache keys.
removeInProgress
boolean removeInProgress
- A flag indicating whether there is a removal operation in progress.
serialVersionUID: 7615611393249532285L
log
org.apache.commons.logging.Log log
|
Package com.opensymphony.oscache.base.persistence |
|
Package com.opensymphony.oscache.general |
applicationCache
Cache applicationCache
- Application cache
|
Package com.opensymphony.oscache.plugins.clustersupport |
data
Serializable data
- Any additional data that may be required
type
int type
- The type of notification message.
|
Package com.opensymphony.oscache.plugins.diskpersistence |
cachePath
File cachePath
- Base path where the disk cache reside.
contextTmpDir
File contextTmpDir
root
String root
- Root path for disk cache
md
MessageDigest md
|
Package com.opensymphony.oscache.web |
admin
ServletCacheAdministrator admin
- The admin for this cache
scope
int scope
- The scope of that cache.
flushTimes
Map<K,V> flushTimes
- Map containing the flush times of different scopes
cacheKey
String cacheKey
- Key to use for storing and retrieving Object in contexts (Servlet, session).
useHostDomainInKey
boolean useHostDomainInKey
- Set property cache.use.host.domain.in.key=true to add domain information to key
generation for hosting multiple sites.
|
Package com.opensymphony.oscache.web.filter |
refreshPeriod
long refreshPeriod
- the refresh period (in milliseconds) of a certain cache filter
locale
Locale locale
contentEncoding
String contentEncoding
contentType
String contentType
content
byte[] content
expires
long expires
lastModified
long lastModified
maxAge
long maxAge
etag
String etag
contentDisposition
String contentDisposition
|
Package com.opensymphony.oscache.web.tag |
cancelUpdateRequired
boolean cancelUpdateRequired
- A flag to indicate whether a NeedsRefreshException was thrown and
the update needs to be cancelled
cache
Cache cache
groups
List<E> groups
- If no groups are specified, the cached content does not get put into any groups
admin
ServletCacheAdministrator admin
actualKey
String actualKey
- The actual key to use. This is generated based on the supplied key, scope etc.
content
String content
- The content that was retrieved from cache
cron
String cron
- The cron expression that is used to expire cache entries at specific dates and/or times.
key
String key
- if cache key is null, the request URI is used
language
String language
- The ISO-639 language code to distinguish different pages in application scope
refreshPolicyClass
String refreshPolicyClass
- Class used to handle the refresh policy logic
refreshPolicyParam
String refreshPolicyParam
- Parameters that will be passed to the init method of the
refresh policy instance.
refresh
boolean refresh
- Whether the cache should be refreshed instantly
useBody
boolean useBody
- used for subtags to tell this tag that we should use the cached version
mode
int mode
- The cache mode. Valid values are SILENT_MODE
scope
int scope
- The cache scope to use
time
int time
- time (in seconds) before cache should be refreshed
admin
ServletCacheAdministrator admin
group
String group
- A cache group.
If specified, all content in that group will be flushed
key
String key
- Tag key.
pattern
String pattern
- if pattern value is specified, all keys that contain the pattern are flushed.
scope
String scope
cacheScope
int cacheScope
language
String language
- The ISO-639 language code to distinguish different pages in application scope.
groups
Object groups
group
Object group
use
boolean use
|