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 2018/12/17 02:26:49 UTC

[1/2] james-project git commit: MAILBOX-211 Remove some other classes related to previous implementation of distributed listeners

Repository: james-project
Updated Branches:
  refs/heads/master 9d42cc30a -> e85f41a1e


MAILBOX-211 Remove some other classes related to previous implementation of distributed listeners

These classes were no more used


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

Branch: refs/heads/master
Commit: e85f41a1ea9948f7dda924849a5b81631a9e1604
Parents: e4e52e1
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 14 15:20:30 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Mon Dec 17 09:25:54 2018 +0700

----------------------------------------------------------------------
 .../mailbox/store/event/EventSerializer.java    | 29 ------------
 .../store/publisher/MessageConsumer.java        | 33 -------------
 .../store/publisher/MessageReceiver.java        | 26 -----------
 .../mailbox/store/publisher/Publisher.java      | 35 --------------
 .../james/mailbox/store/publisher/Topic.java    | 49 --------------------
 5 files changed, 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e85f41a1/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventSerializer.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventSerializer.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventSerializer.java
deleted file mode 100644
index c108edd..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventSerializer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- * 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.mailbox.store.event;
-
-import org.apache.james.mailbox.MailboxListener;
-
-public interface EventSerializer {
-
-    byte[] serializeEvent(MailboxListener.MailboxEvent event) throws Exception;
-
-    MailboxListener.MailboxEvent deSerializeEvent(byte[] serializedEvent) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/e85f41a1/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageConsumer.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageConsumer.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageConsumer.java
deleted file mode 100644
index b03de3f..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageConsumer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- * 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.mailbox.store.publisher;
-
-/**
- * Will consume messages from exterior sources for the given MessageReceiver
- */
-public interface MessageConsumer {
-
-    void setMessageReceiver(MessageReceiver messageReceiver);
-
-    void init(Topic topic) throws Exception;
-
-    void destroy() throws Exception;
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/e85f41a1/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageReceiver.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageReceiver.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageReceiver.java
deleted file mode 100644
index 3d76524..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/MessageReceiver.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- * 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.mailbox.store.publisher;
-
-public interface MessageReceiver {
-
-    void receiveSerializedEvent(byte[] serializedEvent);
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/e85f41a1/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Publisher.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Publisher.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Publisher.java
deleted file mode 100644
index 1ee8bf7..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Publisher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- * 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.mailbox.store.publisher;
-
-import java.io.Closeable;
-
-/**
- * The Publisher can be used to send information outside James.
- *
- * For instance you can send information to a message queue or perform a POST on a restful API
- */
-public interface Publisher extends Closeable {
-
-    void publish(Topic topic, byte[] message);
-
-    void init();
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/e85f41a1/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Topic.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Topic.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Topic.java
deleted file mode 100644
index 9f48eb2..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/publisher/Topic.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- * 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.mailbox.store.publisher;
-
-import com.google.common.base.Objects;
-
-public class Topic {
-
-    private final String value;
-
-    public Topic(String value) {
-        this.value = value;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-        Topic topic = (Topic) o;
-        return Objects.equal(this.value, topic.value);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(value);
-    }
-}


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


[2/2] james-project git commit: MAILBOX-358 StoreMailboxPath is no more needed

Posted by bt...@apache.org.
MAILBOX-358 StoreMailboxPath is no more needed


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

Branch: refs/heads/master
Commit: e4e52e18c0dfab167f251f8ca7839a951410d55e
Parents: 9d42cc3
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 14 15:17:48 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Mon Dec 17 09:25:54 2018 +0700

----------------------------------------------------------------------
 .../james/mailbox/store/StoreMailboxPath.java   | 43 --------------------
 .../mailbox/store/StoreMessageManager.java      | 10 ++---
 .../james/mailbox/store/event/EventFactory.java | 13 +++---
 .../mail/AbstractLockingModSeqProvider.java     |  9 ++--
 .../store/mail/AbstractLockingUidProvider.java  |  7 ++--
 5 files changed, 17 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e4e52e18/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxPath.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxPath.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxPath.java
deleted file mode 100644
index 85fff49..0000000
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxPath.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- * 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.mailbox.store;
-
-import org.apache.james.mailbox.model.MailboxPath;
-import org.apache.james.mailbox.store.mail.model.Mailbox;
-
-public class StoreMailboxPath extends MailboxPath {
-
-    public StoreMailboxPath(String namespace, String user, String name) {
-        super(namespace, user, name);
-    }
-
-    public StoreMailboxPath(MailboxPath mailboxPath) {
-        super(mailboxPath);
-    }
-
-    public StoreMailboxPath(MailboxPath mailboxPath, String name) {
-        super(mailboxPath, name);
-    }
-    
-    public StoreMailboxPath(Mailbox mailbox) {
-        super(mailbox.generateAssociatedPath());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/e4e52e18/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
index 434c948..5e98042 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
@@ -598,10 +598,10 @@ public class StoreMessageManager implements org.apache.james.mailbox.MessageMana
      */
     public List<MessageRange> copyTo(final MessageRange set, final StoreMessageManager toMailbox, final MailboxSession session) throws MailboxException {
         if (!toMailbox.isWriteable(session)) {
-            throw new ReadOnlyException(new StoreMailboxPath(toMailbox.getMailboxEntity()), session.getPathDelimiter());
+            throw new ReadOnlyException(toMailbox.getMailboxPath(), session.getPathDelimiter());
         }
 
-        return locker.executeWithLock(session, new StoreMailboxPath(toMailbox.getMailboxEntity()), () -> {
+        return locker.executeWithLock(session, toMailbox.getMailboxPath(), () -> {
             SortedMap<MessageUid, MessageMetaData> copiedUids = copy(set, toMailbox, session);
             return MessageRange.toRanges(new ArrayList<>(copiedUids.keySet()));
         }, true);
@@ -620,11 +620,11 @@ public class StoreMessageManager implements org.apache.james.mailbox.MessageMana
             throw new ReadOnlyException(getMailboxPath(), session.getPathDelimiter());
         }
         if (!toMailbox.isWriteable(session)) {
-            throw new ReadOnlyException(new StoreMailboxPath(toMailbox.getMailboxEntity()), session.getPathDelimiter());
+            throw new ReadOnlyException(toMailbox.getMailboxPath(), session.getPathDelimiter());
         }
 
         //TODO lock the from mailbox too, in a non-deadlocking manner - how?
-        return locker.executeWithLock(session, new StoreMailboxPath(toMailbox.getMailboxEntity()), () -> {
+        return locker.executeWithLock(session, toMailbox.getMailboxPath(), () -> {
             SortedMap<MessageUid, MessageMetaData> movedUids = move(set, toMailbox, session);
             return MessageRange.toRanges(new ArrayList<>(movedUids.keySet()));
         }, true);
@@ -804,7 +804,7 @@ public class StoreMessageManager implements org.apache.james.mailbox.MessageMana
     
     @Override
     public MailboxPath getMailboxPath() throws MailboxException {
-        return new StoreMailboxPath(getMailboxEntity());
+        return getMailboxEntity().generateAssociatedPath();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/e4e52e18/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventFactory.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventFactory.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventFactory.java
index c41d512..d9c087b 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventFactory.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/EventFactory.java
@@ -36,7 +36,6 @@ import org.apache.james.mailbox.model.MessageMetaData;
 import org.apache.james.mailbox.model.MessageMoves;
 import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.model.UpdatedFlags;
-import org.apache.james.mailbox.store.StoreMailboxPath;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
@@ -47,7 +46,7 @@ public class EventFactory {
     }
 
     public MailboxListener.Added added(MailboxSession.SessionId sessionId, User user, SortedMap<MessageUid, MessageMetaData> uids, Mailbox mailbox) {
-        return new MailboxListener.Added(sessionId, user, new StoreMailboxPath(mailbox), mailbox.getMailboxId(), uids);
+        return new MailboxListener.Added(sessionId, user, mailbox.generateAssociatedPath(), mailbox.getMailboxId(), uids);
     }
 
     public MailboxListener.Expunged expunged(MailboxSession session,  Map<MessageUid, MessageMetaData> uids, Mailbox mailbox) {
@@ -55,7 +54,7 @@ public class EventFactory {
     }
 
     public MailboxListener.Expunged expunged(MailboxSession.SessionId sessionId, User user, Map<MessageUid, MessageMetaData> uids, Mailbox mailbox) {
-        return new MailboxListener.Expunged(sessionId, user, new StoreMailboxPath(mailbox), mailbox.getMailboxId(), uids);
+        return new MailboxListener.Expunged(sessionId, user, mailbox.generateAssociatedPath(), mailbox.getMailboxId(), uids);
     }
 
     public MailboxListener.FlagsUpdated flagsUpdated(MailboxSession session, List<MessageUid> uids, Mailbox mailbox, List<UpdatedFlags> uflags) {
@@ -63,7 +62,7 @@ public class EventFactory {
     }
 
     public MailboxListener.FlagsUpdated flagsUpdated(MailboxSession.SessionId sessionId, User user, List<MessageUid> uids, Mailbox mailbox, List<UpdatedFlags> uflags) {
-        return new MailboxListener.FlagsUpdated(sessionId, user, new StoreMailboxPath(mailbox), mailbox.getMailboxId(), uids, uflags);
+        return new MailboxListener.FlagsUpdated(sessionId, user, mailbox.generateAssociatedPath(), mailbox.getMailboxId(), uids, uflags);
     }
 
     public MailboxListener.MailboxRenamed mailboxRenamed(MailboxSession session, MailboxPath from, Mailbox to) {
@@ -71,7 +70,7 @@ public class EventFactory {
     }
 
     public MailboxListener.MailboxRenamed mailboxRenamed(MailboxSession.SessionId sessionId, User user, MailboxPath from, Mailbox to) {
-        return new MailboxListener.MailboxRenamed(sessionId, user, from, to.getMailboxId(), new StoreMailboxPath(to));
+        return new MailboxListener.MailboxRenamed(sessionId, user, from, to.getMailboxId(), to.generateAssociatedPath());
     }
 
     public MailboxListener.MailboxDeletion mailboxDeleted(MailboxSession session, Mailbox mailbox, QuotaRoot quotaRoot,
@@ -81,7 +80,7 @@ public class EventFactory {
 
     public MailboxListener.MailboxDeletion mailboxDeleted(MailboxSession.SessionId sessionId, User user, Mailbox mailbox, QuotaRoot quotaRoot,
                                                           QuotaCount deletedMessageCount, QuotaSize totalDeletedSize) {
-        return new MailboxListener.MailboxDeletion(sessionId, user, new StoreMailboxPath(mailbox), quotaRoot, deletedMessageCount, totalDeletedSize, mailbox.getMailboxId());
+        return new MailboxListener.MailboxDeletion(sessionId, user, mailbox.generateAssociatedPath(), quotaRoot, deletedMessageCount, totalDeletedSize, mailbox.getMailboxId());
     }
 
     public MailboxListener.MailboxAdded mailboxAdded(MailboxSession session, Mailbox mailbox) {
@@ -89,7 +88,7 @@ public class EventFactory {
     }
 
     public MailboxListener.MailboxAdded mailboxAdded(MailboxSession.SessionId sessionId, User user, Mailbox mailbox) {
-        return new MailboxListener.MailboxAdded(sessionId, user, new StoreMailboxPath(mailbox), mailbox.getMailboxId());
+        return new MailboxListener.MailboxAdded(sessionId, user, mailbox.generateAssociatedPath(), mailbox.getMailboxId());
     }
 
     public MailboxListener.MailboxACLUpdated aclUpdated(MailboxSession session, MailboxPath mailboxPath, ACLDiff aclDiff, MailboxId mailboxId) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/e4e52e18/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java
index dd790b4..5f8ec92 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingModSeqProvider.java
@@ -23,14 +23,11 @@ import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxId;
-import org.apache.james.mailbox.store.StoreMailboxPath;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 
 
 /**
  * Abstract base implementation of {@link ModSeqProvider} which uses the given {@link MailboxPathLocker} to lock the {@link Mailbox} during the mod-seq generation.
- * 
- *
  */
 public abstract class AbstractLockingModSeqProvider implements ModSeqProvider {
 
@@ -41,15 +38,15 @@ public abstract class AbstractLockingModSeqProvider implements ModSeqProvider {
     }
     
     @Override
-    public long nextModSeq(final MailboxSession session, final Mailbox mailbox) throws MailboxException {
+    public long nextModSeq(MailboxSession session, Mailbox mailbox) throws MailboxException {
         boolean writeLock = true;
-        return locker.executeWithLock(session, new StoreMailboxPath(mailbox),
+        return locker.executeWithLock(session, mailbox.generateAssociatedPath(),
             () -> lockedNextModSeq(session, mailbox),
             writeLock);
     }
     
     @Override
-    public long nextModSeq(final MailboxSession session, final MailboxId mailboxId) throws MailboxException {
+    public long nextModSeq(MailboxSession session, MailboxId mailboxId) {
         throw new NotImplementedException("Not implemented");
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/e4e52e18/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java
index 165d567..35325e1 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractLockingUidProvider.java
@@ -24,7 +24,6 @@ import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageUid;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxId;
-import org.apache.james.mailbox.store.StoreMailboxPath;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 
 
@@ -43,9 +42,9 @@ public abstract class AbstractLockingUidProvider implements UidProvider {
     }
     
     @Override
-    public MessageUid nextUid(final MailboxSession session, final Mailbox mailbox) throws MailboxException {
+    public MessageUid nextUid(MailboxSession session, Mailbox mailbox) throws MailboxException {
         boolean writeLock = true;
-        return locker.executeWithLock(session, new StoreMailboxPath(mailbox),
+        return locker.executeWithLock(session, mailbox.generateAssociatedPath(),
             () -> lockedNextUid(session, mailbox),
             writeLock);
     }
@@ -56,7 +55,7 @@ public abstract class AbstractLockingUidProvider implements UidProvider {
     protected abstract MessageUid lockedNextUid(MailboxSession session, Mailbox mailbox) throws MailboxException;
 
     @Override
-    public MessageUid nextUid(MailboxSession session, MailboxId mailboxId) throws MailboxException {
+    public MessageUid nextUid(MailboxSession session, MailboxId mailboxId) {
         throw new NotImplementedException("Not implemented");
     }
 }


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