use of com.netflix.fenzo.AutoScaleRule in project mantis by Netflix.
the class MantisMasterAPI method setupDummyAgentClusterAutoScaler.
private static void setupDummyAgentClusterAutoScaler() {
final AutoScaleRule dummyAutoScaleRule = new AutoScaleRule() {
@Override
public String getRuleName() {
return "test";
}
@Override
public int getMinIdleHostsToKeep() {
return 1;
}
@Override
public int getMaxIdleHostsToKeep() {
return 10;
}
@Override
public long getCoolDownSecs() {
return 300;
}
@Override
public boolean idleMachineTooSmall(VirtualMachineLease lease) {
return false;
}
};
AgentClustersAutoScaler.initialize(() -> new HashSet<>(Collections.singletonList(dummyAutoScaleRule)), new Observer<AutoScaleAction>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(AutoScaleAction autoScaleAction) {
}
});
}
use of com.netflix.fenzo.AutoScaleRule in project mantis by Netflix.
the class MasterMain method setupDummyAgentClusterAutoScaler.
private static void setupDummyAgentClusterAutoScaler() {
final AutoScaleRule dummyAutoScaleRule = new AutoScaleRule() {
@Override
public String getRuleName() {
return "test";
}
@Override
public int getMinIdleHostsToKeep() {
return 1;
}
@Override
public int getMaxIdleHostsToKeep() {
return 10;
}
@Override
public long getCoolDownSecs() {
return 300;
}
@Override
public boolean idleMachineTooSmall(VirtualMachineLease lease) {
return false;
}
};
AgentClustersAutoScaler.initialize(() -> new HashSet<>(Collections.singletonList(dummyAutoScaleRule)), new Observer<AutoScaleAction>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(AutoScaleAction autoScaleAction) {
}
});
}
Aggregations