ColdBox Platform v3.8.0

coldbox.system.cache.providers
Class CFProvider

WEB-INF.cftags.component
        extended by coldbox.system.cache.providers.CFProvider
All Implemented Interfaces:
ICacheProvider
Direct Known Subclasses:
CFColdBoxProvider

public class CFProvider
extends WEB-INF.cftags.component

******************************************************************************* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Author: Luis Majano Description: This CacheBox provider communicates with the built in caches in the Adobe ColdFusion Engine.

Constructor Summary
init()
          Constructor
 
Method Summary
 any clear(any objectKey)
          clear an element from cache
 void clearAll()
          clear all elements from cache
 void clearByKeySnippet(any keySnippet, [any regex='false'], [any async='false'])
          Clear by key snippet
 any clearQuiet(any objectKey)
          clear with no stats
 void clearStatistics()
          clear the cache stats
 void configure()
          configure the cache for operation
 void expireAll()
          not implemented by cache
 void expireObject(any objectKey)
          not implemented by cache
 any get(any objectKey)
          get an item from cache
 any getCacheFactory()
          get the associated cache factory
 any getCachedObjectMetadata(any objectKey)
          get an object's cached metadata
 any getConfiguration()
          get the cache configuration structure
 any getEventManager()
          get the event manager
 any getKeys()
          get all the keys in this provider
 any getName()
          get the cache name
 any getObjectStore()
          Returns the ehCache storage session according to configured cache name
 any getOrSet(any objectKey, any produce, [any timeout='0'], [any lastAccessTimeout='0'], [any 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 item silently from cache, no stats advised
 any getSize()
          get cache size
 any getStats()
 any getStoreMetadataKeyMap()
          Get a key lookup structure where cachebox can build the report on
 any getStoreMetadataReport()
          get the cache's metadata report
 any isClusterCoherent()
 any isEnabled()
 any isExpired(any objectKey)
          Not implemented by this cache
 any isNodeCoherent()
 any isReportingEnabled()
 any isTerracotaClustered()
 any lookup(any objectKey)
          check if object in cache
 any lookupQuiet(any objectKey)
          check if object in cache with no stats
 void reap()
          Not implemented, let ehCache due its thang!
 any set(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extra])
          set an object in cache
 void setCacheFactory(any cacheFactory)
          set the associated cache factory
 void setConfiguration(any configuration)
          set the cache configuration structure
 void setEventManager(any EventManager)
          set the event manager
 void setName(any name)
          set the cache name
 any setQuiet(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extra])
          set an object in cache with no stats
 void shutdown()
          shutdown the cache
private void validateConfiguration()
          Validate the configuration
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Method Detail

clear

public any clear(any objectKey)
clear an element from cache

Specified by:
clear in interface ICacheProvider
Parameters:
objectKey

clearAll

public void clearAll()
clear all elements from cache

Specified by:
clearAll in interface ICacheProvider

clearByKeySnippet

public void clearByKeySnippet(any keySnippet, [any regex='false'], [any async='false'])
Clear by key snippet

Parameters:
keySnippet
regex
async

clearQuiet

public any clearQuiet(any objectKey)
clear with no stats

Specified by:
clearQuiet in interface ICacheProvider
Parameters:
objectKey

clearStatistics

public void clearStatistics()
clear the cache stats

Specified by:
clearStatistics in interface ICacheProvider

configure

public void configure()
configure the cache for operation

Specified by:
configure in interface ICacheProvider

expireAll

public void expireAll()
not implemented by cache

Specified by:
expireAll in interface ICacheProvider

expireObject

public void expireObject(any objectKey)
not implemented by cache

Specified by:
expireObject in interface ICacheProvider
Parameters:
objectKey

get

public any get(any objectKey)
get an item from cache

Specified by:
get in interface ICacheProvider
Parameters:
objectKey

getCacheFactory

public any getCacheFactory()
get the associated cache factory

Specified by:
getCacheFactory in interface ICacheProvider

getCachedObjectMetadata

public any getCachedObjectMetadata(any objectKey)
get an object's cached metadata

Specified by:
getCachedObjectMetadata in interface ICacheProvider
Parameters:
objectKey

getConfiguration

public any getConfiguration()
get the cache configuration structure

Specified by:
getConfiguration in interface ICacheProvider

getEventManager

public any getEventManager()
get the event manager

Specified by:
getEventManager in interface ICacheProvider

getKeys

public any getKeys()
get all the keys in this provider

Specified by:
getKeys in interface ICacheProvider

getName

public any getName()
get the cache name

Specified by:
getName in interface ICacheProvider

getObjectStore

public any getObjectStore()
Returns the ehCache storage session according to configured cache name

Specified by:
getObjectStore in interface ICacheProvider

getOrSet

public any getOrSet(any objectKey, any produce, [any timeout='0'], [any lastAccessTimeout='0'], [any 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

Parameters:
objectKey
produce
timeout
lastAccessTimeout
extra

getQuiet

public any getQuiet(any objectKey)
get an item silently from cache, no stats advised

Specified by:
getQuiet in interface ICacheProvider
Parameters:
objectKey

getSize

public any getSize()
get cache size

Specified by:
getSize in interface ICacheProvider

getStats

public any getStats()

Specified by:
getStats in interface ICacheProvider

getStoreMetadataKeyMap

public any getStoreMetadataKeyMap()
Get a key lookup structure where cachebox can build the report on. Ex: [timeout=timeout,lastAccessTimeout=idleTimeout]. It is a way for the visualizer to construct the columns correctly on the reports

Specified by:
getStoreMetadataKeyMap in interface ICacheProvider

getStoreMetadataReport

public any getStoreMetadataReport()
get the cache's metadata report

Specified by:
getStoreMetadataReport in interface ICacheProvider

isClusterCoherent

public any isClusterCoherent()


isEnabled

public any isEnabled()

Specified by:
isEnabled in interface ICacheProvider

isExpired

public any isExpired(any objectKey)
Not implemented by this cache

Specified by:
isExpired in interface ICacheProvider
Parameters:
objectKey

isNodeCoherent

public any isNodeCoherent()


isReportingEnabled

public any isReportingEnabled()

Specified by:
isReportingEnabled in interface ICacheProvider

isTerracotaClustered

public any isTerracotaClustered()


lookup

public any lookup(any objectKey)
check if object in cache

Specified by:
lookup in interface ICacheProvider
Parameters:
objectKey

lookupQuiet

public any lookupQuiet(any objectKey)
check if object in cache with no stats

Specified by:
lookupQuiet in interface ICacheProvider
Parameters:
objectKey

reap

public void reap()
Not implemented, let ehCache due its thang!

Specified by:
reap in interface ICacheProvider

set

public any set(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extra])
set an object in cache

Specified by:
set in interface ICacheProvider
Parameters:
objectKey
object
timeout
lastAccessTimeout
extra

setCacheFactory

public void setCacheFactory(any cacheFactory)
set the associated cache factory

Specified by:
setCacheFactory in interface ICacheProvider
Parameters:
cacheFactory

setConfiguration

public void setConfiguration(any configuration)
set the cache configuration structure

Specified by:
setConfiguration in interface ICacheProvider
Parameters:
configuration

setEventManager

public void setEventManager(any EventManager)
set the event manager

Specified by:
setEventManager in interface ICacheProvider
Parameters:
EventManager

setName

public void setName(any name)
set the cache name

Specified by:
setName in interface ICacheProvider
Parameters:
name

setQuiet

public any setQuiet(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extra])
set an object in cache with no stats

Specified by:
setQuiet in interface ICacheProvider
Parameters:
objectKey
object
timeout
lastAccessTimeout
extra

shutdown

public void shutdown()
shutdown the cache

Specified by:
shutdown in interface ICacheProvider

validateConfiguration

private void validateConfiguration()
Validate the configuration


ColdBox Platform v3.8.0