Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticsearch.http: implemented onMessageQueueEmpty function #1668

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,9 @@ protected void deinit() {
client.deinit();
options.deinit();
}

@Override
public void onMessageQueueEmpty() {
client.onMessageQueueEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ public interface ESClient {
void deinit();
boolean send(ESIndex index);
String getClusterName();
void onMessageQueueEmpty();
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,9 @@ protected void loadConfigFile(String cfgFile, Builder settingsBuilder) {
public boolean send(ESIndex index) {
return messageProcessor.send(index);
}

@Override
public void onMessageQueueEmpty() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,9 @@ public String getClusterName() {
}
return clusterName;
}

@Override
public void onMessageQueueEmpty() {
messageProcessor.onMessageQueueEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,9 @@ public boolean send(Index index) {
messageCounter++;
return true;
}

@Override
public void onMessageQueueEmpty() {
flush();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ public boolean send(ESIndex index) {
Index req = new Index.Builder(index.getFormattedMessage()).index(index.getIndex()).type(index.getType()).id(index.getId()).build();
return send(req);
}

public void onMessageQueueEmpty() {

}
}