|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |
WEB-INF.cftags.interfacecoldbox.system.cache.ICacheProvider
public interface ICacheProvider
The main interface for a CacheBox cache provider object, you implement it so CacheBox can manage it for you.
Method Summary | |
---|---|
any<boolean> |
clear(any objectKey)
Clears an object from the cache by using its cache key |
void |
clearAll()
Clear all the cache elements from the cache |
any<boolean> |
clearQuiet(any objectKey)
Clears an object from the cache by using its cache key |
void |
clearStatistics()
Clear the cache statistics |
void |
configure()
This method makes the cache ready to accept elements and run |
void |
expireAll()
Expire all the elments in the cache (if supported by the provider) |
void |
expireObject(any objectKey)
Expires an object from the cache by using its cache key |
any |
get(any objectKey)
Get an object from the cache and updates stats |
any<CacheFactory> |
getCacheFactory()
Get the cache factory reference this cache provider belongs to |
any<struct> |
getCachedObjectMetadata(any objectKey)
Get a cache objects metadata about its performance |
any<struct> |
getConfiguration()
Get the structure of configuration parameters for the cache |
any |
getEventManager()
Get this cache managers event listener manager |
any<array> |
getKeys()
Returns a list of all elements in the cache, whether or not they are expired |
any |
getName()
Get the name of this cache |
any<IObjectStore> |
getObjectStore()
If the cache provider implements it, this returns the cache's object store as type: coldbox |
any |
getQuiet(any objectKey)
Get an object from the cache without updating stats or listners |
any<numeric> |
getSize()
Get the number of elements in the cache |
any<ICacheStats> |
getStats()
Get the cache statistics object as coldbox |
any<struct> |
getStoreMetadataKeyMap()
Get a key lookup structure where cachebox can build the report on |
any<struct> |
getStoreMetadataReport()
Get a structure of all the keys in the cache with their appropriate metadata structures |
any<Boolean> |
isEnabled()
Returns a flag indicating if the cache is ready for operation |
any<boolean> |
isExpired(any objectKey)
Has the object key expired in the cache |
any<Boolean> |
isReportingEnabled()
Returns a flag indicating if the cache has reporting enabled |
any<struct> |
lookup(any objectKey)
Check if an object is in cache, if not found it records a miss |
any<struct> |
lookupQuiet(any objectKey)
Check if an object is in cache, no stats updated or listeners |
void |
reap()
Send a reap or flush command to the cache |
any<struct> |
set(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any<struct> extra])
sets an object in cache and returns true if set correctly, else false |
void |
setCacheFactory(any<CacheFactory> cacheFactory)
Set the cache factory reference for this cache |
void |
setConfiguration(any<struct> configuration)
Set the entire configuration structure for this cache |
void |
setEventManager(any eventManager)
Set the event manager for this cache |
void |
setName(any name)
Set the cache name |
any<struct> |
setQuiet(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any<struct> extra])
sets an object in cache and returns true if set correctly, else false |
void |
shutdown()
Shutdown command issued when CacheBox is going through shutdown phase |
Methods inherited from class WEB-INF.cftags.interface |
---|
|
Method Detail |
---|
public any<boolean> clear(any objectKey)
objectKey
- The object cache keypublic void clearAll()
public any<boolean> clearQuiet(any objectKey)
objectKey
- The object cache keypublic void clearStatistics()
public void configure()
public void expireAll()
public void expireObject(any objectKey)
objectKey
- The object cache keypublic any get(any objectKey)
objectKey
- The object keypublic any<CacheFactory> getCacheFactory()
public any<struct> getCachedObjectMetadata(any objectKey)
objectKey
- The key of the object to lookup its metadatapublic any<struct> getConfiguration()
public any getEventManager()
public any<array> getKeys()
public any getName()
public any<IObjectStore> getObjectStore()
public any getQuiet(any objectKey)
objectKey
- The object keypublic any<numeric> getSize()
public any<ICacheStats> getStats()
public any<struct> getStoreMetadataKeyMap()
public any<struct> getStoreMetadataReport()
public any<Boolean> isEnabled()
public any<boolean> isExpired(any objectKey)
objectKey
- The object keypublic any<Boolean> isReportingEnabled()
public any<struct> lookup(any objectKey)
objectKey
- The key of the object to lookup.public any<struct> lookupQuiet(any objectKey)
objectKey
- The key of the object to lookup.public void reap()
public any<struct> set(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any<struct> extra])
objectKey
- The object cache keyobject
- The object to cachetimeout
- The timeout to use on the object (if any, provider specific)lastAccessTimeout
- The idle timeout to use on the object (if any, provider specific)extra
- A map of name-value pairs to use as extra arguments to pass to a providers set operationpublic void setCacheFactory(any<CacheFactory> cacheFactory)
cacheFactory
public void setConfiguration(any<struct> configuration)
configuration
- The configuration structurepublic void setEventManager(any eventManager)
eventManager
- The event manager classpublic void setName(any name)
name
- The cache namepublic any<struct> setQuiet(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any<struct> extra])
objectKey
- The object cache keyobject
- The object to cachetimeout
- The timeout to use on the object (if any, provider specific)lastAccessTimeout
- The idle timeout to use on the object (if any, provider specific)extra
- A map of name-value pairs to use as extra arguments to pass to a providers set operationpublic void shutdown()
|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |