Interface StorageHousekeepingController

All Known Implementing Classes:
StorageHousekeepingController.Default

public interface StorageHousekeepingController
  • Method Details

    • housekeepingIntervalMs

      long housekeepingIntervalMs()
      Returns:
      The housekeeping interval in milliseconds.
    • housekeepingTimeBudgetNs

      long housekeepingTimeBudgetNs()
      Returns:
      The general housekeeping time budget per interval in nanoseconds.
    • garbageCollectionTimeBudgetNs

      long garbageCollectionTimeBudgetNs()
      Returns:
      The garbage collection housekeeping time budget per interval in nanoseconds.
    • liveCheckTimeBudgetNs

      long liveCheckTimeBudgetNs()
      Returns:
      The live/cache check housekeeping time budget per interval in nanoseconds.
    • fileCheckTimeBudgetNs

      long fileCheckTimeBudgetNs()
      Returns:
      The file cleanup housekeeping time budget per interval in nanoseconds.
    • New

      Pseudo-constructor method to create a new StorageHousekeepingController instance using default values defined by StorageHousekeepingController.Defaults.
      Returns:
      a new StorageHousekeepingController instance.
      See Also:
      New(long,long), Storage.HousekeepingController(), StorageHousekeepingController.Defaults
    • New

      static StorageHousekeepingController New​(long housekeepingIntervalMs, long housekeepingTimeBudgetNs)
      Pseudo-constructor method to create a new StorageHousekeepingController instance using the passed values.

      The combination of these two values can be used to define how much percentage of the system's computing power shall be used for storage housekeeping.
      Example:
      10 Million ns (= 10 ms) housekeeping budget every 1000 ms means (roughly) 1% of the computing power will be used for storage housekeeping.

      Note that in an application where no store occures over a longer period of time, all housekeeping tasks will eventually be completed, reducing the required computing power to 0. When the next store occurs, the housekeeping starts anew.
      How long the housekeeping requires to complete depends on the computing power it is granted by the StorageHousekeepingController, other configurations (like entity data cache timeouts) and the amount of data that has to be managed.

      See all "issue~" methods in StorageConnection for a way to call housekeeping actions explicitly and causing them to be executed completely.

      Parameters:
      housekeepingIntervalMs - the interval in milliseconds that the storage threads shall execute their various housekeeping actions (like cache clearing checks, file consolidation, etc.). Must be greater than zero.
      housekeepingTimeBudgetNs - the time budget in nanoseconds that each storage thread will use to perform a housekeeping action. This is a best effort value, not a strictly reliable border value. This means a housekeeping action can occasionally take slightly longer than specified here. Must be greater than zero.
      Returns:
      a new StorageHousekeepingController instance.
      See Also:
      New(), Storage.HousekeepingController(long,long)