mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
don't let guice by mistake inject two instances
This commit is contained in:
parent
35c8774304
commit
7721b86995
@ -19,8 +19,9 @@
|
|||||||
|
|
||||||
package org.elasticsearch.transport.local;
|
package org.elasticsearch.transport.local;
|
||||||
|
|
||||||
import org.elasticsearch.util.guice.inject.Inject;
|
|
||||||
import org.elasticsearch.jmx.MBean;
|
import org.elasticsearch.jmx.MBean;
|
||||||
|
import org.elasticsearch.transport.Transport;
|
||||||
|
import org.elasticsearch.util.guice.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kimchy (Shay Banon)
|
* @author kimchy (Shay Banon)
|
||||||
@ -30,7 +31,7 @@ public class LocalTransportManagement {
|
|||||||
|
|
||||||
private final LocalTransport transport;
|
private final LocalTransport transport;
|
||||||
|
|
||||||
@Inject public LocalTransportManagement(LocalTransport transport) {
|
@Inject public LocalTransportManagement(Transport transport) {
|
||||||
this.transport = transport;
|
this.transport = (LocalTransport) transport;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,9 +19,10 @@
|
|||||||
|
|
||||||
package org.elasticsearch.transport.netty;
|
package org.elasticsearch.transport.netty;
|
||||||
|
|
||||||
import org.elasticsearch.util.guice.inject.Inject;
|
|
||||||
import org.elasticsearch.jmx.MBean;
|
import org.elasticsearch.jmx.MBean;
|
||||||
import org.elasticsearch.jmx.ManagedAttribute;
|
import org.elasticsearch.jmx.ManagedAttribute;
|
||||||
|
import org.elasticsearch.transport.Transport;
|
||||||
|
import org.elasticsearch.util.guice.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kimchy (Shay Banon)
|
* @author kimchy (Shay Banon)
|
||||||
@ -31,8 +32,8 @@ public class NettyTransportManagement {
|
|||||||
|
|
||||||
private final NettyTransport transport;
|
private final NettyTransport transport;
|
||||||
|
|
||||||
@Inject public NettyTransportManagement(NettyTransport transport) {
|
@Inject public NettyTransportManagement(Transport transport) {
|
||||||
this.transport = transport;
|
this.transport = (NettyTransport) transport;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute(description = "Number of connections this node has to other nodes")
|
@ManagedAttribute(description = "Number of connections this node has to other nodes")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user