james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r960333 - /james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java
Date Sun, 04 Jul 2010 12:37:04 GMT
Author: norman
Date: Sun Jul  4 12:37:03 2010
New Revision: 960333

URL: http://svn.apache.org/viewvc?rev=960333&view=rev
Log:
Allow to specify the scaling in the MapperFactory

Modified:
    james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java

Modified: james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java?rev=960333&r1=960332&r2=960333&view=diff
==============================================================================
--- james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java
(original)
+++ james/imap/trunk/jcr/src/main/java/org/apache/james/imap/jcr/JCRMailboxSessionMapperFactory.java
Sun Jul  4 12:37:03 2010
@@ -44,29 +44,32 @@ public class JCRMailboxSessionMapperFact
     private final Log logger;
     private final char delimiter;
     private final NodeLocker locker;
-    private final int DEFAULT_SCALING = 2;
+    private final static int DEFAULT_SCALING = 2;
+    private int scaling;
+    private int messageScaling;
 
     public JCRMailboxSessionMapperFactory(final MailboxSessionJCRRepository repository, final
NodeLocker locker) {
-        this(repository, locker, DEFAULT_FOLDER_DELIMITER);
+        this(repository, locker, DEFAULT_FOLDER_DELIMITER, DEFAULT_SCALING, JCRMessageMapper.MESSAGE_SCALE_DAY);
     }
 
-    public JCRMailboxSessionMapperFactory(final MailboxSessionJCRRepository repository, final
NodeLocker locker, final char delimiter) {
+    public JCRMailboxSessionMapperFactory(final MailboxSessionJCRRepository repository, final
NodeLocker locker, final char delimiter, final int scaling, final int messageScaling) {
         this.repository = repository;
         this.logger = LogFactory.getLog(JCRSubscriptionManager.class);
         this.delimiter = delimiter;
         this.locker = locker;
+        this.scaling = scaling;
+        this.messageScaling = messageScaling;
     }
-
     
     @Override
     public MailboxMapper<String> createMailboxMapper(MailboxSession session) throws
MailboxException {
-        JCRMailboxMapper mapper = new JCRMailboxMapper(repository, session, locker, DEFAULT_SCALING,
logger, delimiter);
+        JCRMailboxMapper mapper = new JCRMailboxMapper(repository, session, locker, scaling,
logger, delimiter);
         return mapper;
     }
 
     @Override
     public MessageMapper<String> createMessageMapper(MailboxSession session) throws
MailboxException {
-        JCRMessageMapper messageMapper = new JCRMessageMapper(repository, session, locker,
logger);
+        JCRMessageMapper messageMapper = new JCRMessageMapper(repository, session, locker,
logger, messageScaling);
         return messageMapper;
     }
 



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