james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject [10/15] james-project git commit: JAMES-2408 DeleteByQueryPerformer should return a Void
Date Wed, 06 Jun 2018 07:01:04 GMT
JAMES-2408 DeleteByQueryPerformer should return a Void


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/7ce70f52
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/7ce70f52
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/7ce70f52

Branch: refs/heads/master
Commit: 7ce70f52cc5db72d5c03e2a5fc962bded2be2b49
Parents: f41382e
Author: benwa <btellier@linagora.com>
Authored: Tue Jun 5 14:40:22 2018 +0700
Committer: Matthieu Baechler <matthieu@apache.org>
Committed: Wed Jun 6 08:58:57 2018 +0200

----------------------------------------------------------------------
 .../org/apache/james/backends/es/DeleteByQueryPerformer.java    | 5 +++--
 .../java/org/apache/james/backends/es/ElasticSearchIndexer.java | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7ce70f52/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/DeleteByQueryPerformer.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/DeleteByQueryPerformer.java
b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/DeleteByQueryPerformer.java
index f78d80f..b5923aa 100644
--- a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/DeleteByQueryPerformer.java
+++ b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/DeleteByQueryPerformer.java
@@ -58,11 +58,11 @@ public class DeleteByQueryPerformer {
         this.typeName = typeName;
     }
 
-    public Future<?> perform(QueryBuilder queryBuilder) {
+    public Future<Void> perform(QueryBuilder queryBuilder) {
         return executor.submit(() -> doDeleteByQuery(queryBuilder));
     }
 
-    protected void doDeleteByQuery(QueryBuilder queryBuilder) {
+    protected Void doDeleteByQuery(QueryBuilder queryBuilder) {
         new ScrollIterable(client,
             client.prepareSearch(aliasName.getValue())
                 .setTypes(typeName.getValue())
@@ -73,6 +73,7 @@ public class DeleteByQueryPerformer {
             .stream()
             .map(searchResponse -> deleteRetrievedIds(client, searchResponse))
             .forEach(ListenableActionFuture::actionGet);
+        return null;
     }
 
     private ListenableActionFuture<BulkResponse> deleteRetrievedIds(Client client,
SearchResponse searchResponse) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/7ce70f52/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/ElasticSearchIndexer.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/ElasticSearchIndexer.java
b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/ElasticSearchIndexer.java
index ae61a9f..3f62e0c 100644
--- a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/ElasticSearchIndexer.java
+++ b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/ElasticSearchIndexer.java
@@ -106,7 +106,7 @@ public class ElasticSearchIndexer {
         }
     }
 
-    public Future<?> deleteAllMatchingQuery(QueryBuilder queryBuilder) {
+    public Future<Void> deleteAllMatchingQuery(QueryBuilder queryBuilder) {
         return deleteByQueryPerformer.perform(queryBuilder);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message