|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.cache.AbstractCacheBoxProvider
coldbox.system.cache.providers.CacheBoxProvider
public class CacheBoxProvider
The coolest standalone CacheBox Provider ever built
Constructor Summary | |
---|---|
init()
Constructor |
Method Summary | |
---|---|
void |
_reap()
Reap the cache, clear out everything that is dead |
private void |
announceExpiration(any objectKey)
Announce an Expiration |
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 |
void |
clearByKeySnippet(any keySnippet, [any<boolean> regex='false'], [any<boolean> async='false'])
Clears keys using the passed in object key snippet |
any<boolean> |
clearKey(any objectKey)
Deprecated, please use clear() |
any<struct> |
clearMulti(any keys, [any prefix=''])
Clears objects from the cache by using its cache key |
any<boolean> |
clearQuiet(any objectKey)
Clears an object from the cache by using its cache key |
void |
configure()
Configures the cache for operation, sets the configuration object, sets and creates the eviction policy and clears the stats |
void |
expireAll()
Expire All Objects |
void |
expireByKeySnippet(any keySnippet, [any<boolean> regex='false'])
Same as expireKey but can touch multiple objects depending on the keysnippet that is sent in |
void |
expireObject(any objectKey)
Expire an Object |
any |
get(any objectKey)
Get an object from cache |
any<struct> |
getCachedObjectMetadata(any objectKey)
Get the cached object's metadata structure |
any<struct> |
getCachedObjectMetadataMulti(any keys, [any prefix=''])
Get the cached object's metadata structure |
any |
getJavaRuntime()
Get the java runtime object for reporting purposes |
any<array> |
getKeys()
Get a listing of all the keys of the objects in the cache |
any<struct> |
getMulti(any keys, [any prefix=''])
The returned value is a structure of name-value pairs of all the keys that where found |
any<IObjectStore> |
getObjectStore()
If the cache provider implements it, this returns the cache's object store as type: coldbox |
any |
getOrSet(any objectKey, any produce, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra='[runtime expression]'])
Tries to get an object from the cache, if not found, it calls the 'produce' closure to produce the data and cache it |
any |
getQuiet(any objectKey)
Get an object from cache |
any<numeric> |
getSize()
Get the cache's size in items |
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> |
isExpired(any objectKey)
Has the object key expired in the cache |
private any |
locateEvictionPolicy([string policy])
Locate the eviction policy |
private any |
locateObjectStore([string store])
Locate the object store |
any<boolean> |
lookup(any objectKey)
Check if an object is in cache, if not found it records a miss |
any<struct> |
lookupMulti(any keys, [any prefix=''])
The returned value is a structure of name-value pairs of all the keys that where found or not |
any<boolean> |
lookupQuiet(any objectKey)
Check if an object is in cache quietly, advising nobody! |
void |
reap()
Reap the cache, clear out everything that is dead |
any<boolean> |
set(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra])
sets an object in cache |
void |
setMulti(any<struct> mapping, [any timeout=''], [any lastAccessTimeout=''], [any prefix=''])
Sets Multiple Ojects in the cache |
any<boolean> |
setQuiet(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra])
sets an object in cache |
void |
shutdown()
Shutdown command issued when CacheBox is going through shutdown phase |
private boolean |
thresholdChecks(any threshold='')
JVM Threshold checks |
private void |
validateConfiguration()
Validate incoming set configuration data |
Methods inherited from class coldbox.system.cache.AbstractCacheBoxProvider |
---|
clearStatistics, getCacheFactory, getCacheID, getConfiguration, getEventManager, getMemento, getName, getStats, getUtil, isEnabled, isReportingEnabled, setCacheFactory, setConfiguration, setEventManager, setName, statusCheck
|
Methods inherited from class WEB-INF.cftags.component |
---|
None
|
Constructor Detail |
---|
public init()
Method Detail |
---|
public void _reap()
private void announceExpiration(any objectKey)
objectKey
- The object cache keypublic any<boolean> clear(any objectKey)
clear
in interface
ICacheProvider
objectKey
- The object cache keypublic void clearAll()
clearAll
in interface
ICacheProvider
public void clearByKeySnippet(any keySnippet, [any<boolean> regex='false'], [any<boolean> async='false'])
keySnippet
- the cache key snippet to useregex
- Use regex or notasync
- Run command asynchronously or notpublic any<boolean> clearKey(any objectKey)
objectKey
- The object cache keypublic any<struct> clearMulti(any keys, [any prefix=''])
keys
- The comma-delimmitted list or array of keys to remove.prefix
- A prefix to prepend to the keyspublic any<boolean> clearQuiet(any objectKey)
clearQuiet
in interface
ICacheProvider
objectKey
- The object cache keypublic void configure()
configure
in interface
ICacheProvider
public void expireAll()
expireAll
in interface
ICacheProvider
public void expireByKeySnippet(any keySnippet, [any<boolean> regex='false'])
keySnippet
- The key snippet to useregex
- Use regex or notpublic void expireObject(any objectKey)
expireObject
in interface
ICacheProvider
objectKey
- The object cache keypublic any get(any objectKey)
get
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public any<struct> getCachedObjectMetadata(any objectKey)
getCachedObjectMetadata
in interface
ICacheProvider
objectKey
- The key of the object to lookup its metadatapublic any<struct> getCachedObjectMetadataMulti(any keys, [any prefix=''])
keys
- The comma delimited list or array of keys to retrieve from the cache.prefix
- A prefix to prepend to the keyspublic any getJavaRuntime()
public any<array> getKeys()
getKeys
in interface
ICacheProvider
public any<struct> getMulti(any keys, [any prefix=''])
keys
- The comma delimited list or array of keys to retrieve from the cache.prefix
- A prefix to prepend to the keyspublic any<IObjectStore> getObjectStore()
getObjectStore
in interface
ICacheProvider
public any getOrSet(any objectKey, any produce, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra='[runtime expression]'])
objectKey
- The object cache keyproduce
- The closure/udf to produce the data if not foundtimeout
- 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 any getQuiet(any objectKey)
getQuiet
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public any<numeric> getSize()
getSize
in interface
ICacheProvider
public any<struct> getStoreMetadataKeyMap()
getStoreMetadataKeyMap
in interface
ICacheProvider
public any<struct> getStoreMetadataReport()
getStoreMetadataReport
in interface
ICacheProvider
public any<boolean> isExpired(any objectKey)
isExpired
in interface
ICacheProvider
objectKey
- The object keyprivate any locateEvictionPolicy([string policy])
policy
private any locateObjectStore([string store])
store
public any<boolean> lookup(any objectKey)
lookup
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public any<struct> lookupMulti(any keys, [any prefix=''])
keys
- The comma delimited list or an array of keys to lookup in the cache.prefix
- A prefix to prepend to the keyspublic any<boolean> lookupQuiet(any objectKey)
lookupQuiet
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public void reap()
reap
in interface
ICacheProvider
public any<boolean> set(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra])
set
in interface
ICacheProvider
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 setMulti(any<struct> mapping, [any timeout=''], [any lastAccessTimeout=''], [any prefix=''])
mapping
- The structure of name value pairs 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)prefix
- A prefix to prepend to the keyspublic any<boolean> setQuiet(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any<struct> extra])
setQuiet
in interface
ICacheProvider
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()
shutdown
in interface
ICacheProvider
private boolean thresholdChecks(any threshold='')
threshold
- The threshold to checkprivate void validateConfiguration()
|
ColdBox Platform v3.8.0 | ||||
FRAMES |