bindWorkerExecutor() in ThriftServerModule only has three choices:
bind to an executor type;
bind to an executor instance;
bind to a Provider instance
However, I need to have a flavor that binds to a Provider type. This is because 3. exposes the constructor for the Provider, which creates problems if the Provider needs dependencies. In particular, if I need to export the queue size as a stats value, I need dependencies on the stats library which is itself configured with Guice. Such a Provider cannot have its dependency satisfied in configure().
bindWorkerExecutor() in ThriftServerModule only has three choices:
However, I need to have a flavor that binds to a Provider type. This is because 3. exposes the constructor for the Provider, which creates problems if the Provider needs dependencies. In particular, if I need to export the queue size as a stats value, I need dependencies on the stats library which is itself configured with Guice. Such a Provider cannot have its dependency satisfied in configure().