Id - public abstract class AbstractLockingModSeqProvider<Id> extends Object implements ModSeqProvider<Id>
ModSeqProvider which uses the given MailboxPathLocker to lock the Mailbox during the mod-seq generation.| Constructor and Description |
|---|
AbstractLockingModSeqProvider(MailboxPathLocker locker) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract long |
lockedNextModSeq(MailboxSession session,
Mailbox<Id> mailbox)
Generate the next mod-seq for the given
Mailbox while holding a lock on it. |
long |
nextModSeq(MailboxSession session,
Mailbox<Id> mailbox)
Return the next mod-sequence which can be used for the
Mailbox. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithighestModSeqpublic AbstractLockingModSeqProvider(MailboxPathLocker locker)
public long nextModSeq(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
ModSeqProviderMailbox.
Its important that the returned mod-sequence is higher then the last used and that the next call of this method does return a higher
one.
The first mod-seq must be >= 1nextModSeq in interface ModSeqProvider<Id>MailboxExceptionprotected abstract long lockedNextModSeq(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
Mailbox while holding a lock on it.session - mailbox - MailboxExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.