public abstract class Cache extends Object
Modifier and Type | Field and Description |
---|---|
protected CacheConfiguration |
m_Configuration
The configuration parameters of this cache.
|
Constructor and Description |
---|
Cache(CacheConfiguration configuration)
Constructs a cache.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this cache.
|
abstract Object |
find(Object id)
Gets an item from this cache.
|
CacheConfiguration |
getCacheConfiguration()
Gets the configuration parameters of this cache.
|
abstract CachePerformance |
getCachePerformance()
Gets the performance information for this cache.
|
Enumeration |
getElements()
Gets an Enumeration of the items in this cache.
|
abstract void |
put(Object id,
Object value)
Puts an item in this cache.
|
abstract void |
remove(Object id)
Removes an item from this cache.
|
void |
reset()
Resets this cache.
|
abstract void |
resetCachePerformance()
Resets the performance information for this cache.
|
abstract void |
setCacheConfiguration(CacheConfiguration configuration)
Alters the configuration of this cache.
|
protected CacheConfiguration m_Configuration
public Cache(CacheConfiguration configuration)
configuration
- the configuration parameters for the new cachepublic final CacheConfiguration getCacheConfiguration()
This method returns a copy of the configuration parameters for
this cache. To alter the configuration of this cache, use the
CacheConfiguration mutators to adjust the parameters' values
and then call setCacheConfiguration
to apply the
altered CacheConfiguration.
public abstract void setCacheConfiguration(CacheConfiguration configuration) throws IfsException
Certain cache configuration parameters may be immutable; the CacheConfiguration value of any such parameter will be ignored. Refer to the Javadoc of each concrete Cache subclass for a list of such parameters.
configuration
- the configuration parametersIfsException
- (IFS-10810) if the operation failspublic abstract void put(Object id, Object value) throws IfsException
id
- the item idvalue
- the itemIfsException
- if the operation failspublic abstract void remove(Object id) throws IfsException
id
- the item idIfsException
- if the operation failspublic abstract Object find(Object id) throws IfsException
id
- the item idIfsException
- if the operation failspublic Enumeration getElements() throws IfsException
IfsException
- (IFS-19008) if an Enumeration is not availablepublic abstract CachePerformance getCachePerformance()
public abstract void resetCachePerformance()
public void reset()
This causes the cache to be emptied and its performance information to be reset.
public void dispose()
After the cache is disposed, it is invalid to use this cache.
Copyright © 2023. All rights reserved.