when getting the _meta doc from _river index (per river), make sure the callback listener is threaded

This commit is contained in:
Shay Banon 2011-10-05 17:29:11 +02:00
parent 5c783c8ef1
commit 8f55e8835f
1 changed files with 2 additions and 2 deletions

View File

@ -218,7 +218,7 @@ public class RiversService extends AbstractLifecycleComponent<RiversService> {
if (rivers.containsKey(routing.riverName())) {
continue;
}
client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").setListenerThreaded(true).execute(new ActionListener<GetResponse>() {
@Override public void onResponse(GetResponse getResponse) {
if (!rivers.containsKey(routing.riverName())) {
if (getResponse.exists()) {
@ -238,7 +238,7 @@ public class RiversService extends AbstractLifecycleComponent<RiversService> {
final ActionListener<GetResponse> listener = this;
threadPool.schedule(TimeValue.timeValueSeconds(5), ThreadPool.Names.SAME, new Runnable() {
@Override public void run() {
client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").setListenerThreaded(true).execute(listener);
}
});
} else {