Statistics
Applies to Roots and Stores
Available APIs
API Member | Structure | Explanation |
---|---|---|
Both | Use a filesystem watcher to watch for changes, useful for a | |
Both | Remove any cached statistic information | |
| Roots | List all the currently ready stores under the root |
| Roots | Get the current root size in KiB including all sub-stores |
| Roots | Get the number of tiles currently cached in all sub-stores |
| Stores | Get the current store size in KiB |
| Stores | Get the number of tiles currently cached |
| Stores | Get the number of tiles retrieved from the store during browsing |
| Stores | Get the number of tiles not retrieved from the store during browsing |
Watch For Changes
recursive
is only available in Roots. If true
(default false
), then the resulting Stream
merges in the sub-Stores' watchChanges
methods.
debounce
defaults to 200ms, and is useful to remove small consecutive changes to prevent spam to your interface.
fileSystemEvents
defaults to FileSystemEvent.all
, and is useful to remove only some types of change from the resulting Stream
.
Returns a Stream<void>
, useful to trigger UI updates with other statistics.
Statistic Caching
Many statistics are cached for better performance, as some take a long time to calculate.
If this causes problems, chain noCache
before the below API getters/methods, like this: stats.noCache.storeSize
.
Alternatively, clear the currently cached statistics using invalidateCachedStatistics()
. This is automatically called when new tiles are added to the store.
Last updated