lucee.Component cachebox.system.cache.store.indexers.MetadataIndexer
This is a utility object that helps object stores keep their items indexed and pretty
Constructor Summary | |
---|---|
init(any fields)
Constructor. |
Method Summary | |
---|---|
void
|
clear(any objectKey)
Clear a metadata key. |
void
|
clearAll()
Clear the entire metadata map. |
any
|
getFields()
Get the bounded fields list. |
any
|
getKeys()
Returns an array of the keys stored in the index. |
any
|
getObjectMetadata(any objectKey)
Get a metadata entry for a specific entry. |
any
|
getObjectMetadataProperty(any objectKey, any property)
Get a specific metadata property for a specific entry. |
any
|
getPoolMetadata()
Get the entire pool reference. |
any
|
getSize()
Get the size of the indexer. |
any
|
getSortedKeys(any property, [any sortType='text'], [any sortOrder='asc'])
Get an array of sorted keys for this indexer according to parameters. |
any
|
objectExists(any objectKey)
Check if the metadata entry exists for an object. |
void
|
setFields(any fields)
Override the constructed metadata fields this index is binded to. |
void
|
setObjectMetadata(any objectKey, any metadata)
Set the metadata entry for a specific entry. |
void
|
setObjectMetadataProperty(any objectKey, any property, any value)
Set a metadata property for a specific entry. |
private void
|
validateField(any target)
Validate or thrown an exception on an invalid field. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
fields
- The list or array of fields to bind this index onMethod Detail |
---|
Clear a metadata key
objectKey
- The key of the objectClear the entire metadata map
Get the bounded fields list
Returns an array of the keys stored in the index
Get a metadata entry for a specific entry. Exception if key not found
objectKey
- The key of the objectGet a specific metadata property for a specific entry
objectKey
- The key of the objectproperty
- The property of the metadata to retrieve, must exist in the binded fields or exception is thrownGet the entire pool reference
Get the size of the indexer
Get an array of sorted keys for this indexer according to parameters
property
- The property field to sort the index on. It must exist in the binded fields or exceptionsortType
- The sort ordering: numeric, text or textnocasesortOrder
- The sort order: asc or descCheck if the metadata entry exists for an object
objectKey
- The key of the objectOverride the constructed metadata fields this index is binded to
fields
- The list or array of fields to bind this index onSet the metadata entry for a specific entry
objectKey
- The key of the objectmetadata
- The metadata structure to store for the cache entrySet a metadata property for a specific entry
objectKey
- The key of the objectproperty
- The property of the metadata to retrievevalue
- The value of the propertyValidate or thrown an exception on an invalid field
target
- The target field to validate