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 5149f8d5e9f2a650d1c49f4a2f3062115b635c2c Author: Benoit Tellier <[email protected]> AuthorDate: Thu Apr 4 13:31:14 2019 +0700 JAMES-2703 Depreacte mailbox/caching module This module will be removed straight after upcoming 3.4.0 release unless it finds a maintainer --- mailbox/caching/pom.xml | 3 +++ .../james/mailbox/caching/CacheInvalidatingMailboxListener.java | 4 ++++ .../apache/james/mailbox/caching/CacheLoaderFromUnderlying.java | 6 ++++++ .../org/apache/james/mailbox/caching/CachingMailboxMapper.java | 7 +++++-- .../james/mailbox/caching/CachingMailboxSessionMapperFactory.java | 6 +++++- .../org/apache/james/mailbox/caching/CachingMessageMapper.java | 6 +++++- .../java/org/apache/james/mailbox/caching/MailboxByPathCache.java | 6 +++++- .../org/apache/james/mailbox/caching/MailboxMetadataCache.java | 6 +++++- .../org/apache/james/mailbox/caching/guava/AbstractGuavaCache.java | 6 ++++++ .../org/apache/james/mailbox/caching/guava/GuavaCacheWrapper.java | 6 ++++++ .../james/mailbox/caching/guava/GuavaMailboxByPathCache.java | 4 ++++ .../james/mailbox/caching/guava/GuavaMailboxMetadataCache.java | 6 +++++- .../mailbox/caching/CacheInvalidatingMailboxListenerTest.java | 4 ++++ 13 files changed, 63 insertions(+), 7 deletions(-) diff --git a/mailbox/caching/pom.xml b/mailbox/caching/pom.xml index dc39f84..622b9da 100644 --- a/mailbox/caching/pom.xml +++ b/mailbox/caching/pom.xml @@ -31,6 +31,9 @@ <packaging>bundle</packaging> <name>Apache James :: Mailbox :: Caching</name> + <description>JAMES-2703 This maven module is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer. + This module lacks tests and is not used in James products hence the choice to deprecate it.</description> + <dependencies> <dependency> <groupId>${james.groupId}</groupId> diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListener.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListener.java index 930b86f..6d40377 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListener.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListener.java @@ -11,7 +11,11 @@ import org.slf4j.LoggerFactory; /** * A MailboxListener that invalidates the configured caches in response to Events * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public class CacheInvalidatingMailboxListener implements MailboxListener.GroupMailboxListener { public static class CacheInvalidatingMailboxListenerGroup extends Group {} diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheLoaderFromUnderlying.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheLoaderFromUnderlying.java index 9322ed5..fb0bc35 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheLoaderFromUnderlying.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CacheLoaderFromUnderlying.java @@ -1,5 +1,11 @@ package org.apache.james.mailbox.caching; +/** + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. + */ +@Deprecated public interface CacheLoaderFromUnderlying<KeyT, ValueT, UnderlyingT, ExceptT extends Throwable> { ValueT load(KeyT key, UnderlyingT underlying) throws ExceptT; } diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxMapper.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxMapper.java index 8cf039f..757ebd8 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxMapper.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxMapper.java @@ -34,9 +34,12 @@ import org.apache.james.mailbox.store.mail.MailboxMapper; /** * A MailboxMapper implementation that uses a MailboxByPathCache to cache the information * from the underlying MailboxMapper - * + * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ - +@Deprecated public class CachingMailboxMapper implements MailboxMapper { private final MailboxMapper underlying; diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxSessionMapperFactory.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxSessionMapperFactory.java index 2021828..c443f2c 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxSessionMapperFactory.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMailboxSessionMapperFactory.java @@ -17,8 +17,12 @@ import org.apache.james.mailbox.store.user.SubscriptionMapper; * A MailboxSessionMapperFactory that uses the underlying MailboxSessionMapperFactory to provide * caching variants of MessageMapper and MailboxMapper built around the MessageMapper and MailboxMapper * provided by it - * + * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public class CachingMailboxSessionMapperFactory extends MailboxSessionMapperFactory { diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMessageMapper.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMessageMapper.java index 64fbaa0..f6d617b 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMessageMapper.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/CachingMessageMapper.java @@ -21,8 +21,12 @@ import org.apache.james.mailbox.store.mail.model.MailboxMessage; /** * A MessageMapper implementation that uses a MailboxMetadataCache to cache the information * from the underlying MessageMapper - * + * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public class CachingMessageMapper implements MessageMapper { private final MessageMapper underlying; diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxByPathCache.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxByPathCache.java index 1c23a35..664e1f2 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxByPathCache.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxByPathCache.java @@ -8,8 +8,12 @@ import org.apache.james.mailbox.store.mail.MailboxMapper; /** * Caches the MailboxPath -> Mailbox mapping - * + * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public interface MailboxByPathCache { Mailbox findMailboxByPath(MailboxPath mailboxName, diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxMetadataCache.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxMetadataCache.java index da03a39..a183eae 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxMetadataCache.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/MailboxMetadataCache.java @@ -10,8 +10,12 @@ import org.apache.james.mailbox.store.mail.MessageMapper; /** * Caches the simple yet possibly expensive to compute metadata info * about a Mailbox like all/unseen messages count and similar - * + * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public interface MailboxMetadataCache { long countMessagesInMailbox(Mailbox mailbox, diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/AbstractGuavaCache.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/AbstractGuavaCache.java index 1285964..3647dd7 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/AbstractGuavaCache.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/AbstractGuavaCache.java @@ -4,6 +4,12 @@ import java.util.concurrent.TimeUnit; import com.google.common.cache.CacheBuilder; +/** + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. + */ +@Deprecated public class AbstractGuavaCache { // TODO this can probably be instantiated more elegant way diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaCacheWrapper.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaCacheWrapper.java index 7ac8689..a8226e0 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaCacheWrapper.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaCacheWrapper.java @@ -4,6 +4,12 @@ import org.apache.james.mailbox.caching.CacheLoaderFromUnderlying; import com.google.common.cache.Cache; +/** + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. + */ +@Deprecated public abstract class GuavaCacheWrapper<KeyT, ValueT, UnderlyingT, KeyRepresentationT, ExceptT extends Throwable> implements CacheLoaderFromUnderlying<KeyT, ValueT, UnderlyingT, ExceptT> { diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxByPathCache.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxByPathCache.java index f33717d..ae1cce9 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxByPathCache.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxByPathCache.java @@ -14,7 +14,11 @@ import com.google.common.cache.Cache; * Note: for efficiency/simplicity reasons the cache key is MailboxPath.toString() * That may help also make it compatible with other cache backends in the future. * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ +@Deprecated public class GuavaMailboxByPathCache extends AbstractGuavaCache implements MailboxByPathCache { private final Cache<String, Mailbox> findMailboxByPathCache = BUILDER.build(); diff --git a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxMetadataCache.java b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxMetadataCache.java index b41e54d..ee7586b 100644 --- a/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxMetadataCache.java +++ b/mailbox/caching/src/main/java/org/apache/james/mailbox/caching/guava/GuavaMailboxMetadataCache.java @@ -10,12 +10,16 @@ import org.apache.james.mailbox.model.MailboxId; import org.apache.james.mailbox.store.mail.MessageMapper; import com.google.common.cache.Cache; + /** * Guava-based implementation of MailboxMetadataCache. * Note: for efficiency/simplicity reasons the cache key is Mailbox.getMailboxId() * + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + * + * This module lacks tests and is not used in James products hence the choice to deprecate it. */ - +@Deprecated public class GuavaMailboxMetadataCache extends AbstractGuavaCache implements MailboxMetadataCache { // TODO these can probably be instantiated more elegant way diff --git a/mailbox/caching/src/test/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListenerTest.java b/mailbox/caching/src/test/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListenerTest.java index db725b1..1b7a79e 100644 --- a/mailbox/caching/src/test/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListenerTest.java +++ b/mailbox/caching/src/test/java/org/apache/james/mailbox/caching/CacheInvalidatingMailboxListenerTest.java @@ -24,6 +24,10 @@ import static org.assertj.core.api.Assertions.assertThat; import org.apache.james.mailbox.events.Group; import org.junit.jupiter.api.Test; +/** + * @deprecated JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release, unless it finds a maintainer + */ +@Deprecated class CacheInvalidatingMailboxListenerTest { @Test void deserializeCacheInvalidatingMailboxListenerGroup() throws Exception { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
