Package org.apache.james.mailbox.MailboxPathLocker

Examples of org.apache.james.mailbox.MailboxPathLocker.LockAwareExecution


            // Create parents first
            // If any creation fails then the mailbox will not be created
            // TODO: transaction
            for (final MailboxPath mailbox : mailboxPath.getHierarchyLevels(getDelimiter()))

                locker.executeWithLock(mailboxSession, mailbox, new LockAwareExecution() {

                    public void execute(MailboxSession session, MailboxPath mailbox) throws MailboxException {
                        if (!mailboxExists(mailbox, session)) {
                            final org.apache.james.mailbox.store.mail.model.Mailbox<Id> m = doCreateMailbox(mailbox, session);
                            final MailboxMapper<Id> mapper = mailboxSessionMapperFactory.getMailboxMapper(session);
View Full Code Here


                dispatcher.mailboxRenamed(session, from, to);

                // rename submailboxes
                final MailboxPath children = new MailboxPath(MailboxConstants.USER_NAMESPACE, from.getUser(), from.getName() + getDelimiter() + "%");
                locker.executeWithLock(session, children, new LockAwareExecution() {
                   
                    public void execute(MailboxSession session, MailboxPath children) throws MailboxException {
                        final List<Mailbox<Id>> subMailboxes = mapper.findMailboxWithPathLike(children);
                        for (Mailbox<Id> sub : subMailboxes) {
                            final String subOriginalName = sub.getName();
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.MailboxPathLocker.LockAwareExecution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.