lucee.Component
coldbox.system.cache.store.ConcurrentStore
coldbox.system.cache.store.ConcurrentSoftReferenceStore
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- I am a concurrent soft reference object store. In other words, I am fancy! This store is case-sensitive
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
referenceQueue
The Java soft reference queue used for reaps.
|
true
|
false
|
|
any
|
softRefKeymap
The reverse lookup map for soft references.
|
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init(any<ICacheProvider> cacheProvider)
Constructor. |
|
| Method Summary | |
|---|---|
any
|
clear(any objectKey)
Clears an object from the storage pool. |
void
|
clearAll()
Clear all the elements in the store. |
private any
|
createSoftReference(any objectKey, any target)
Create SR, register cached object and reference. |
any
|
get(any objectKey)
Get an object from cache. |
any
|
getQuiet(any objectKey)
Get an object from cache. |
string
|
getReferenceQueue()
|
any
|
getSoftRefKey(any softRef)
Get the soft reference's key from the soft reference lookback map. |
string
|
getSoftRefKeymap()
|
any
|
lookup(any objectKey)
Check if an object is in cache. |
void
|
reap()
Reap the storage, clean it from old stuff. |
void
|
set(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any extras='[runtime expression]'])
Sets an object in the storage. |
any
|
setReferenceQueue(any referenceQueue)
|
any
|
setSoftRefKeymap(any softRefKeymap)
|
boolean
|
softRefLookup(any softRef)
See if the soft reference is in the reference key map. |
| Methods inherited from class coldbox.system.cache.store.ConcurrentStore |
|---|
| expireObject, flush, getCacheProvider, getIndexer, getJavaCollections, getKeys, getPool, getSize, getStoreID, isExpired, setCacheProvider, setIndexer, setPool, setStoreID |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
cacheProvider - The associated cache provider as coldbox.system.cache.providers.ICacheProvider| Property Detail |
|---|
The Java soft reference queue used for reaps
access - publicrequired - falsereturntype - anyserializable - trueThe reverse lookup map for soft references
access - publicrequired - falsereturntype - anyserializable - true| Method Detail |
|---|
Clears an object from the storage pool
clear
in class
ConcurrentStore
objectKey - The object key to clearClear all the elements in the store
clearAll
in class
ConcurrentStore
Create SR, register cached object and reference
objectKey - The value of the key to storetarget - The target to wrapGet an object from cache. If its a soft reference object it might return a `null` value.
get
in class
ConcurrentStore
objectKey - The key to retrieveGet an object from cache. If its a soft reference object it might return a null value
getQuiet
in class
ConcurrentStore
objectKey - The key to retrieveGet the soft reference's key from the soft reference lookback map
softRef - The soft reference to checkCheck if an object is in cache
lookup
in class
ConcurrentStore
objectKey - The key to lookupReap the storage, clean it from old stuff
reap
in class
ConcurrentStore
Sets an object in the storage
set
in class
ConcurrentStore
objectKey - The object key"object - The object to save"timeout - Timeout in minutes"lastAccessTimeout - Idle Timeout in minutes"extras - A map of extra name-value pairs"referenceQueuesoftRefKeymapSee if the soft reference is in the reference key map
softRef - The soft reference to verify