count

suspend fun PropertyStore.count(): Int(source)

Returns the number of properties in the store.

This is a convenience method that counts the entries from PropertyStore.getAll. Note that this may be an expensive operation for stores backed by external storage, as it retrieves all properties.

Example:

val propertyCount = store.count()
logger.info("Store contains $propertyCount properties")

if (store.count() > 1000) {
logger.warn("Property store is getting large, consider cleanup")
}

Return

the number of properties in the store