Housekeeping
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:

Intervall and Time Budget

Housekeeping interval and time budget is configured by setting up a StorageHousekeepingController.
Available properties are:
1
EmbeddedStorageManager storage = EmbeddedStorage.Foundation(
2
Storage.ConfigurationBuilder()
3
.setHousekeepingController(Storage.HousekeepingController(1000, 10_000_000))
4
.createConfiguration())
5
.start();
Copied!

File Sizes and Payload

The desired file min and max sizes and payload ratio is configured by the StorageDataFileEvaluator:
available properties are:
  • Data file minimum size Files smaller then minimum file size will be merged with other files if possible, default is 1 MB.
  • Data file maximum size Files larger then maximum file size will be split in smaller ones, default is 8 MB.
  • Data file minimum use ratio Ratio of non-gap data contained in a storage file to prevent the file from being dissolved, default is 0.75 (75%).
1
EmbeddedStorageManager storage = EmbeddedStorage.Foundation(
2
Storage.ConfigurationBuilder()
3
.setDataFileEvaluator(Storage.DataFileEvaluator(1024*1024, 1024*1024*8, 0.75))
4
.createConfiguration())
5
.start();
Copied!

Cache

The lifetime of objects in the internal entity cache can be configured by the StorageEntityCacheEvaluator:
Available properties are:
  • Entity cache threshold
    Abstract threshold value, roughly comparable to size in bytes with a time component, at which a cache must be cleared of some entities. Default is 1000000000.
  • Entity cache timeout Time in milliseconds after that an entity is considered to be old if not read meanwhile. must be greater zero, default is 86400000ms (1 day).
1
EmbeddedStorageManager storage = EmbeddedStorage.Foundation(
2
Storage.ConfigurationBuilder()
3
.setEntityCacheEvaluator(Storage.EntityCacheEvaluator(
4
86_400_000,
5
1_000_000_000))
6
.createConfiguration())
7
.start();
Copied!
For external configuration see: Properties
Last modified 11mo ago