All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nitorcreations.willow.autoscaler.AutoScalerModule Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
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());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy