You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
947 B
23 lines
947 B
package com.fr.plugin.memory.release.strategy; |
|
|
|
import com.fr.decision.fun.impl.BaseMemoryReleaseStrategyProcessor; |
|
import com.fr.decision.system.monitor.gc.load.LoadLevel; |
|
import com.fr.decision.system.monitor.release.ReleaseStrategy; |
|
import com.fr.intelli.record.Focus; |
|
import com.fr.intelli.record.Original; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
import java.util.HashMap; |
|
import java.util.Map; |
|
|
|
@EnableMetrics |
|
public class ReleaseStrategyProvider extends BaseMemoryReleaseStrategyProcessor { |
|
|
|
@Override |
|
@Focus(id = StrategyConstant.PLUGIN_ID, text = "Plugin-RELEASE_STRATEGY", source = Original.PLUGIN) |
|
public Map<LoadLevel, ReleaseStrategy> getStrategy() { |
|
Map<LoadLevel, ReleaseStrategy> strategyMap = new HashMap<>(); |
|
strategyMap.put(LoadLevel.HIGH, HighReleaseStrategy.getInstance()); |
|
strategyMap.put(LoadLevel.TERRIBLE, TerribleReleaseStrategy.getInstance()); |
|
return strategyMap; |
|
} |
|
}
|
|
|