Id - public abstract class AbstractLockingUidProvider<Id> extends Object implements UidProvider<Id>
UidProvider which used the given MailboxPathLocker to
lock the Mailbox while the next uid is generated| Constructor and Description |
|---|
AbstractLockingUidProvider(MailboxPathLocker locker) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract long |
lockedNextUid(MailboxSession session,
Mailbox<Id> mailbox)
Generate the next uid to use while the
Mailbox is locked |
long |
nextUid(MailboxSession session,
Mailbox<Id> mailbox)
Return the next uid which can be used while append a Message to the
Mailbox. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlastUidpublic AbstractLockingUidProvider(MailboxPathLocker locker)
public long nextUid(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
UidProviderMailbox.
Its important that the returned uid is higher then the last used and that the next call of this method does return a higher
onenextUid in interface UidProvider<Id>MailboxExceptionprotected abstract long lockedNextUid(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
Mailbox is lockedsession - mailbox - MailboxExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.