Package org.cache2k.core.util
Class TunableFactory
- java.lang.Object
-
- org.cache2k.core.util.TunableFactory
-
public final class TunableFactory extends Object
Provides an instance of a tunable after applying changes taken from configuration file or system properties.- Author:
- Jens Wilke
- See Also:
TunableConstants
-
-
Field Summary
Fields Modifier and Type Field Description static StringCUSTOM_TUNING_FILE_NAMEstatic StringDEFAULT_TUNING_FILE_NAMEstatic StringDEFAULT_TUNING_GRAALVM_FILE_NAMESpecial defaults for GraalVM.static StringTUNE_MARKER
-
Constructor Summary
Constructors Constructor Description TunableFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends TunableConstants>
Tget(Class<T> c)Provide tuning object with initialized information from properties in the class path or system properties.static <T extends TunableConstants>
Tget(Properties p, Class<T> c)Provide tuning object with initialized information from the properties file.
-
-
-
Field Detail
-
DEFAULT_TUNING_GRAALVM_FILE_NAME
public static final String DEFAULT_TUNING_GRAALVM_FILE_NAME
Special defaults for GraalVM. This is the only defaults file we ship at the moment. Maybe we ship different platform defaults in the future. The file name might get extended with CPU architecture (aarch / amd64), VM vendor (android, graal, ...) etc.- See Also:
- Constant Field Values
-
DEFAULT_TUNING_FILE_NAME
public static final String DEFAULT_TUNING_FILE_NAME
- See Also:
- Constant Field Values
-
CUSTOM_TUNING_FILE_NAME
public static final String CUSTOM_TUNING_FILE_NAME
- See Also:
- Constant Field Values
-
TUNE_MARKER
public static final String TUNE_MARKER
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static <T extends TunableConstants> T get(Properties p, Class<T> c)
Provide tuning object with initialized information from the properties file.- Type Parameters:
T- type of requested tunable class- Parameters:
p- Properties from the execution contextc- Tunable class- Returns:
- Created and initialized object
-
get
public static <T extends TunableConstants> T get(Class<T> c)
Provide tuning object with initialized information from properties in the class path or system properties.- Type Parameters:
T- type of requested tunable class- Parameters:
c- Tunable class- Returns:
- Created and initialized object
-
-