james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [30/41] james-project git commit: JAMES-2082 Rename retrieveMessage inin CassandraMessageIdDAO
Date Mon, 10 Jul 2017 17:54:42 GMT
JAMES-2082 Rename retrieveMessage inin CassandraMessageIdDAO


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

Branch: refs/heads/master
Commit: d27cfb1927df981bd52ffa5a68c0627d13a77d43
Parents: aa8d051
Author: benwa <btellier@linagora.com>
Authored: Fri Jul 7 17:17:33 2017 +0700
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Mon Jul 10 14:23:58 2017 +0200

----------------------------------------------------------------------
 .../james/mailbox/cassandra/mail/CassandraMessageIdMapper.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/d27cfb19/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
index bf43a76..0f88959 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
@@ -104,7 +104,7 @@ public class CassandraMessageIdMapper implements MessageIdMapper {
                 .map(messageId -> imapUidDAO.retrieve((CassandraMessageId) messageId,
Optional.empty())))
             .completableFuture()
             .thenApply(stream -> stream.collect(Guavate.toImmutableList()))
-            .thenCompose(composedMessageIds -> retrieveMessages(fetchType, composedMessageIds))
+            .thenCompose(composedMessageIds -> retrieveMessagesAndDoMigrationIfNeeded(fetchType,
composedMessageIds))
             .thenCompose(stream -> attachmentLoader.addAttachmentToMessages(stream, fetchType))
             .thenCompose(this::filterMessagesWithExistingMailbox)
             .join()
@@ -112,7 +112,7 @@ public class CassandraMessageIdMapper implements MessageIdMapper {
     }
 
     private CompletableFuture<Stream<Pair<MessageWithoutAttachment, Stream<MessageAttachmentRepresentation>>>>
-            retrieveMessages(FetchType fetchType, ImmutableList<ComposedMessageIdWithMetaData>
composedMessageIds) {
+            retrieveMessagesAndDoMigrationIfNeeded(FetchType fetchType, ImmutableList<ComposedMessageIdWithMetaData>
composedMessageIds) {
 
         return FluentFutureStream.of(messageDAOV2.retrieveMessages(composedMessageIds, fetchType,
Limit.unlimited()))
             .thenComposeOnAll(v1ToV2Migration::getFromV2orElseFromV1AfterMigration)


---------------------------------------------------------------------
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