public class PredictiveOptimization extends Object implements Optimization
BatchingOptimization and DelayOptimization,
and in additionally this optimization tries to predict aggregated consumption rate in whole cluster in order to reduce the risk of overconsumption that caused by DelayOptimization.
Usage of this optimization can lead to temporal over-consumption because the synchronization with external storage is performed periodically when thresholds are violated, as well as under-consumption in case of the wrong prediction of aggregated consumption rate.
DelayParameters,
PredictionParametersNONE_OPTIMIZED| Constructor and Description |
|---|
PredictiveOptimization(PredictionParameters predictionParameters,
DelayParameters delayParameters,
OptimizationListener listener,
TimeMeter timeMeter) |
| Modifier and Type | Method and Description |
|---|---|
AsyncCommandExecutor |
apply(AsyncCommandExecutor originalExecutor)
Decorates command executor in order to apply optimization strategy.
|
CommandExecutor |
apply(CommandExecutor originalExecutor)
Decorates command executor in order to apply optimization strategy.
|
Optimization |
withListener(OptimizationListener listener)
Specifies the listener for optimization events
|
public PredictiveOptimization(PredictionParameters predictionParameters, DelayParameters delayParameters, OptimizationListener listener, TimeMeter timeMeter)
public Optimization withListener(OptimizationListener listener)
OptimizationwithListener in interface Optimizationlistener - the listener for optimization eventsOptimization with configured listenerpublic CommandExecutor apply(CommandExecutor originalExecutor)
Optimizationapply in interface OptimizationoriginalExecutor - command executor that need to be optimizedpublic AsyncCommandExecutor apply(AsyncCommandExecutor originalExecutor)
Optimizationapply in interface OptimizationoriginalExecutor - command executor that need to be optimizedCopyright © 2024. All rights reserved.