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 2019/11/21 02:00:42 UTC
[james-project] 07/13: [Refactoring] MailboxPathLocker deprecated
executeWithLock method is never used
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
View the commit online:
https://github.com/apache/james-project/commit/bfbcb6cbcb86064ab0f3e6975d4336b3c82c8b55
commit bfbcb6cbcb86064ab0f3e6975d4336b3c82c8b55
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Nov 18 17:50:43 2019 +0700
[Refactoring] MailboxPathLocker deprecated executeWithLock method is never used
---
.../src/main/java/org/apache/james/mailbox/MailboxPathLocker.java | 8 --------
.../java/org/apache/james/mailbox/store/JVMMailboxPathLocker.java | 5 -----
.../java/org/apache/james/mailbox/store/NoMailboxPathLocker.java | 5 -----
3 files changed, 18 deletions(-)
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxPathLocker.java b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxPathLocker.java
index ff68c76..8e283fd 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxPathLocker.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxPathLocker.java
@@ -31,14 +31,6 @@ import org.apache.james.mailbox.model.MailboxPath;
* Implementations that are not able to handle read / write locks in a different way are needed to handle all locks as write lock.
*/
public interface MailboxPathLocker {
-
- /**
- * @deprecated use {@link #executeWithLock(MailboxSession, MailboxPath, LockAwareExecution, boolean)} with argument <code>true</code>
- */
- @Deprecated
- <T> T executeWithLock(MailboxSession session, MailboxPath path, LockAwareExecution<T> execution) throws MailboxException;
-
-
/**
* Execute the {@link LockAwareExecution} while holding a lock on the
* {@link MailboxPath}. If writeLock is true the implementation need to make sure that no other threads can read and write while the lock
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/JVMMailboxPathLocker.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/JVMMailboxPathLocker.java
index b1de0a6..c40f18c 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/JVMMailboxPathLocker.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/JVMMailboxPathLocker.java
@@ -38,11 +38,6 @@ public final class JVMMailboxPathLocker implements MailboxPathLocker {
private final ConcurrentHashMap<MailboxPath, ReadWriteLock> paths = new ConcurrentHashMap<>();
@Override
- public <T> T executeWithLock(MailboxSession session, MailboxPath path, LockAwareExecution<T> execution) throws MailboxException {
- return executeWithLock(session, path, execution, true);
- }
-
- @Override
public <T> T executeWithLock(MailboxSession session, MailboxPath path, LockAwareExecution<T> execution, boolean writeLock) throws MailboxException {
try {
lock(path, writeLock);
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/NoMailboxPathLocker.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/NoMailboxPathLocker.java
index 2ef2fe6..279ebbd 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/NoMailboxPathLocker.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/NoMailboxPathLocker.java
@@ -31,11 +31,6 @@ import org.apache.james.mailbox.model.MailboxPath;
*/
public class NoMailboxPathLocker implements MailboxPathLocker {
@Override
- public <T> T executeWithLock(MailboxSession session, MailboxPath path, LockAwareExecution<T> execution) throws MailboxException {
- return execution.execute();
- }
-
- @Override
public <T> T executeWithLock(MailboxSession session, MailboxPath path, LockAwareExecution<T> execution, boolean writeLock) throws MailboxException {
return execution.execute();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org