You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/07/24 10:34:32 UTC

[james-project] 01/07: JAMES-3314 rename module blob-deduplicating to blob-storage-strategy

This is an automated email from the ASF dual-hosted git repository.

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

commit 649b611f6ff3166284b87b19d8d28b9b0d7b2924
Author: RĂ©mi Kowalski <rk...@linagora.com>
AuthorDate: Tue Jul 21 11:02:23 2020 +0200

    JAMES-3314 rename module blob-deduplicating to blob-storage-strategy
---
 pom.xml                                            |  2 +-
 server/blob/blob-cassandra/pom.xml                 |  2 +-
 server/blob/blob-memory/pom.xml                    |  2 +-
 .../memory/MemoryBlobStorePassThroughTest.java     | 48 ++++++++++++++++++++++
 .../pom.xml                                        |  2 +-
 .../deduplication/DeDuplicationBlobStore.scala     |  0
 .../blob/deduplication/PassThroughBlobStore.scala} |  0
 server/blob/pom.xml                                |  2 +-
 8 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index fbdf065..54cf223 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1128,7 +1128,7 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
-                <artifactId>blob-deduplicating</artifactId>
+                <artifactId>blob-storage-strategy</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
diff --git a/server/blob/blob-cassandra/pom.xml b/server/blob/blob-cassandra/pom.xml
index 733596a..6f6e03e 100644
--- a/server/blob/blob-cassandra/pom.xml
+++ b/server/blob/blob-cassandra/pom.xml
@@ -55,7 +55,7 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>blob-deduplicating</artifactId>
+            <artifactId>blob-storage-strategy</artifactId>
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
diff --git a/server/blob/blob-memory/pom.xml b/server/blob/blob-memory/pom.xml
index 4224387..80e6f6a 100644
--- a/server/blob/blob-memory/pom.xml
+++ b/server/blob/blob-memory/pom.xml
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>blob-deduplicating</artifactId>
+            <artifactId>blob-storage-strategy</artifactId>
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
diff --git a/server/blob/blob-memory/src/test/java/org/apache/james/blob/memory/MemoryBlobStorePassThroughTest.java b/server/blob/blob-memory/src/test/java/org/apache/james/blob/memory/MemoryBlobStorePassThroughTest.java
new file mode 100644
index 0000000..80dba7e
--- /dev/null
+++ b/server/blob/blob-memory/src/test/java/org/apache/james/blob/memory/MemoryBlobStorePassThroughTest.java
@@ -0,0 +1,48 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.blob.memory;
+
+import org.apache.james.blob.api.BlobId;
+import org.apache.james.blob.api.BlobStore;
+import org.apache.james.blob.api.HashBlobId;
+import org.apache.james.blob.api.MetricableBlobStore;
+import org.apache.james.blob.api.MetricableBlobStoreContract;
+import org.junit.jupiter.api.BeforeEach;
+
+public class MemoryBlobStoreTest implements MetricableBlobStoreContract {
+
+    private static final HashBlobId.Factory BLOB_ID_FACTORY = new HashBlobId.Factory();
+    private BlobStore blobStore;
+
+    @BeforeEach
+    void setUp() {
+        blobStore = new MetricableBlobStore(metricsTestExtension.getMetricFactory(), MemoryBlobStoreFactory.create(BLOB_ID_FACTORY));
+    }
+
+    @Override
+    public BlobStore testee() {
+        return blobStore;
+    }
+
+    @Override
+    public BlobId.Factory blobIdFactory() {
+        return BLOB_ID_FACTORY;
+    }
+}
diff --git a/server/blob/blob-deduplicating/pom.xml b/server/blob/blob-storage-strategy/pom.xml
similarity index 98%
rename from server/blob/blob-deduplicating/pom.xml
rename to server/blob/blob-storage-strategy/pom.xml
index b4d2740..e2ba795 100644
--- a/server/blob/blob-deduplicating/pom.xml
+++ b/server/blob/blob-storage-strategy/pom.xml
@@ -27,7 +27,7 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>blob-deduplicating</artifactId>
+    <artifactId>blob-storage-strategy</artifactId>
     <packaging>jar</packaging>
 
     <name>Apache James :: Server :: Blob :: Deduplicating Blob Storage</name>
diff --git a/server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala b/server/blob/blob-storage-strategy/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala
similarity index 100%
copy from server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala
copy to server/blob/blob-storage-strategy/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala
diff --git a/server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala b/server/blob/blob-storage-strategy/src/main/scala/org/apache/james/server/blob/deduplication/PassThroughBlobStore.scala
similarity index 100%
rename from server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/DeDuplicationBlobStore.scala
rename to server/blob/blob-storage-strategy/src/main/scala/org/apache/james/server/blob/deduplication/PassThroughBlobStore.scala
diff --git a/server/blob/pom.xml b/server/blob/pom.xml
index a4d6742..14e37f3 100644
--- a/server/blob/pom.xml
+++ b/server/blob/pom.xml
@@ -34,7 +34,7 @@
 
     <modules>
         <module>blob-api</module>
-        <module>blob-deduplicating</module>
+        <module>blob-storage-strategy</module>
         <module>blob-cassandra</module>
         <module>blob-common</module>
         <module>blob-export-api</module>


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