Class AbstractStore
java.lang.Object
ortus.boxlang.runtime.cache.store.AbstractStore
- All Implemented Interfaces:
IObjectStore
- Direct Known Subclasses:
BlackHoleStore,ConcurrentSoftReferenceStore,ConcurrentStore,FileSystemStore
The base implementation of a cache store in BoxLang.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IStructThe configuration for the storeprotected ICacheProviderThe cache provider associated with this store -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ICachePolicybuildPolicyByName(String policyName) Get a policy by name from BoxLang's policies package.Get the configuration for the storegetName()Get the name of the storeGet a policy for usage by the store.Get the associated cache provider
-
Field Details
-
provider
The cache provider associated with this store -
config
The configuration for the store
-
-
Constructor Details
-
AbstractStore
public AbstractStore()
-
-
Method Details
-
getName
Get the name of the store- Specified by:
getNamein interfaceIObjectStore- Returns:
- The name of the store
-
getConfig
Get the configuration for the store- Specified by:
getConfigin interfaceIObjectStore
-
getProvider
Get the associated cache provider- Specified by:
getProviderin interfaceIObjectStore
-
getPolicy
Get a policy for usage by the store. The policies are stored in the ortus.boxlang.runtime.cache.policies package. - LRU: Least Recently Used - MRU: Most Recently Used - LFU: Least Frequently Used - MFU: Most Frequently Used - FIFO: First In First Out - LIFO: Last In First Out - Random: Randomly evict objects You can also register your own policy by implementing the ICachePolicy interface. -
buildPolicyByName
Get a policy by name from BoxLang's policies package.- Parameters:
policyName- The name of the policy- Returns:
- The policy
- Throws:
BoxRuntimeException- If the policy cannot be loadedBoxRuntimeException- If the policy does not implement ICachePolicyBoxRuntimeException- If the policy cannot be instantiated
-