Class TunableConstants

  • All Implemented Interfaces:
    Cloneable
    Direct Known Subclasses:
    Cache2kCoreProviderImpl.Tunable, ClockProPlusEviction.Tunable, HeapCache.Tunable

    public class TunableConstants
    extends Object
    implements Cloneable
    Base class of all classes that contain code constants. For each cache2k implementation class constants a centralized within an inner class. The rationale behind this is explained in the following.

    Wisely chosen constants are sometimes buried within the code. These are the so called "magic numbers". So let's give them a default place.

    There may be a need to change such a "constant". This provides a simple system wide mechanism to change a parameter, aka "tune" it. So, this can be used for performance optimizations. It may be also possible to provide a tuning set that goes tunes towards execution time or towards space efficiency.

    Testing: Some code has operations that happen very seldom, e.g. for reorganizing. For testing purposes we can trigger these situations by de-tuning.

    If there is a constant need to change a constant, please open an issue. Either it is better to change the tunable constant to a real parameter or a assign it to another value which fits the general purpose better.

    Author:
    Jens Wilke
    • Constructor Detail

      • TunableConstants

        public TunableConstants()