com.nitorcreations.willow.autoscaler.AutoScalerModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of willow-autoscaler Show documentation
Show all versions of willow-autoscaler Show documentation
Willow elastic cloud auto scaler
package com.nitorcreations.willow.autoscaler;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import com.google.inject.AbstractModule;
import com.nitorcreations.willow.messages.WebSocketTransmitter;
public class AutoScalerModule extends AbstractModule {
@Override
protected void configure() {
bind(ScheduledExecutorService.class).toInstance(Executors.newScheduledThreadPool(3));
bind(ExecutorService.class).toInstance(Executors.newCachedThreadPool());
bind(Random.class);
bind(WebSocketTransmitter.class).toInstance(new WebSocketTransmitter());
}
}