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 generatedConstructor 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, wait
lastUid
public AbstractLockingUidProvider(MailboxPathLocker locker)
public long nextUid(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
UidProvider
Mailbox
.
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>
MailboxException
protected abstract long lockedNextUid(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException
Mailbox
is lockedsession
- mailbox
- MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.