james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [james-project] 03/11: JAMES-2710 Add getDeleteByQueryExecutor() for easy spy memory-vault
Date Thu, 18 Apr 2019 07:00:18 GMT
This is an automated email from the ASF dual-hosted git repository.

aduprat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 245146476040907231f58089dfe81b47fd625ee3
Author: datph <dphamhoang@linagora.com>
AuthorDate: Fri Apr 5 11:54:05 2019 +0700

    JAMES-2710 Add getDeleteByQueryExecutor() for easy spy memory-vault
---
 .../org/apache/james/vault/memory/MemoryDeletedMessagesVault.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/memory/MemoryDeletedMessagesVault.java
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/memory/MemoryDeletedMessagesVault.java
index 773faec..ecee56e 100644
--- a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/memory/MemoryDeletedMessagesVault.java
+++ b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/memory/MemoryDeletedMessagesVault.java
@@ -40,6 +40,7 @@ import org.apache.james.vault.utils.DeleteByQueryExecutor;
 import org.apache.james.vault.utils.VaultGarbageCollectionTask;
 import org.reactivestreams.Publisher;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.HashBasedTable;
 import com.google.common.collect.ImmutableList;
@@ -122,10 +123,15 @@ public class MemoryDeletedMessagesVault implements DeletedMessageVault
{
         ZonedDateTime beginningOfRetentionPeriod = now.minus(retentionConfiguration.getRetentionPeriod());
 
         return new VaultGarbageCollectionTask(
-            deleteByQueryExecutor,
+            getDeleteByQueryExecutor(),
             beginningOfRetentionPeriod);
     }
 
+    @VisibleForTesting
+    public DeleteByQueryExecutor getDeleteByQueryExecutor() {
+        return deleteByQueryExecutor;
+    }
+
     private Flux<DeletedMessage> listAll(User user) {
         synchronized (table) {
             return Flux.fromIterable(ImmutableList.copyOf(table.row(user).values()))


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