@Internal public abstract class StaticOptimizations extends java.lang.Object
Constructor and Description |
---|
StaticOptimizations() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheEnvironment()
Enables environment caching.
|
static <T> java.util.Optional<T> |
get(java.lang.Class<T> optimizationClass)
Returns, if available, the optimization data of the requested
type.
|
static boolean |
isEnvironmentCached()
Returns true if the environment should be cached, that is to say
if the environment variables and system properties are deemed
immutable during the whole application run time.
|
static <T> void |
set(T value)
Injects an optimization.
|
public static void cacheEnvironment()
@NonNull public static <T> java.util.Optional<T> get(@NonNull java.lang.Class<T> optimizationClass)
T
- the optimization typeoptimizationClass
- the type of the optimization classpublic static <T> void set(@NonNull T value)
T
- the type of the optimizationvalue
- the optimization to storepublic static boolean isEnvironmentCached()