public final class UnboundedCache extends Cache
Modifier and Type | Field and Description |
---|---|
protected long |
m_HitCount
The number of cache hits.
|
protected Hashtable |
m_Items
The cache items.
|
protected long |
m_MissCount
The number of cache misses.
|
protected long |
m_PutCount
The number of cache puts.
|
protected long |
m_RemoveCount
The number of cache removes.
|
m_Configuration
Constructor and Description |
---|
UnboundedCache(UnboundedCacheConfiguration configuration)
Constructs an unbounded cache.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this cache.
|
Object |
find(Object id)
Gets an item from this cache.
|
CachePerformance |
getCachePerformance()
Gets the performance information for this cache.
|
Enumeration |
getElements()
Gets Enumeration of items in this cache.
|
void |
put(Object id,
Object value)
Puts an item in this cache.
|
void |
remove(Object id)
Removes an item from this cache.
|
void |
reset()
Resets this cache.
|
void |
resetCachePerformance()
Resets the performance information for this cache.
|
void |
setCacheConfiguration(CacheConfiguration configuration)
Alters the configuration of this cache.
|
getCacheConfiguration
protected Hashtable m_Items
protected long m_HitCount
protected long m_MissCount
protected long m_PutCount
protected long m_RemoveCount
public UnboundedCache(UnboundedCacheConfiguration configuration)
configuration
- the configuration paramaters for the new cachepublic final void setCacheConfiguration(CacheConfiguration configuration) throws IfsException
No configuration parameters of an UnboundedCache are updateable. Consequently, this method is a no-op.
setCacheConfiguration
in class Cache
configuration
- the configuration parametersIfsException
- (IFS-10810) if the operation failspublic final void put(Object id, Object value) throws IfsException
put
in class Cache
id
- the item idvalue
- the itemIfsException
- if the operation failspublic final void remove(Object id) throws IfsException
remove
in class Cache
id
- the item idIfsException
- if the operation failspublic final Enumeration getElements() throws IfsException
getElements
in class Cache
IfsException
- if the operation failspublic final Object find(Object id) throws IfsException
find
in class Cache
id
- the item idIfsException
- if the operation failspublic final CachePerformance getCachePerformance()
getCachePerformance
in class Cache
public final void resetCachePerformance()
resetCachePerformance
in class Cache
public void reset()
This causes the cache to be emptied and its performance information to be reset.
Copyright © 2023. All rights reserved.