public class PerUserQuotaManager<Id> extends ListeningQuotaManager
MailboxListener.Added, MailboxListener.Event, MailboxListener.Expunged, MailboxListener.FlagsUpdated, MailboxListener.MailboxACLUpdated, MailboxListener.MailboxAdded, MailboxListener.MailboxDeletion, MailboxListener.MailboxRenamed, MailboxListener.MessageEvent
Constructor and Description |
---|
PerUserQuotaManager(StoreMailboxManager<Id> manager) |
Modifier and Type | Method and Description |
---|---|
protected long |
getMaxMessage(MailboxSession session)
Return the maximum message count which is allowed for the given
MailboxSession (in fact the user which the session is bound to) |
protected long |
getMaxStorage(MailboxSession session)
Return the maximum storage which is allowed for the given
MailboxSession (in fact the user which the session is bound to)
The returned valued must be in bytes |
void |
setDefaultMaxMessage(long maxMessage) |
void |
setDefaultMaxStorage(long maxStorage) |
void |
setUserMaxMessage(Map<String,Long> userMaxMessage) |
void |
setUserMaxStorage(Map<String,Long> userMaxStorage) |
event, getFactory, getMessageQuota, getStorageQuota, isClosed, setCalculateUsedWhenUnlimited
public PerUserQuotaManager(StoreMailboxManager<Id> manager) throws MailboxException
MailboxException
public void setDefaultMaxStorage(long maxStorage)
public void setDefaultMaxMessage(long maxMessage)
protected long getMaxStorage(MailboxSession session) throws MailboxException
ListeningQuotaManager
MailboxSession
(in fact the user which the session is bound to)
The returned valued must be in bytesgetMaxStorage
in class ListeningQuotaManager
MailboxException
protected long getMaxMessage(MailboxSession session) throws MailboxException
ListeningQuotaManager
MailboxSession
(in fact the user which the session is bound to)getMaxMessage
in class ListeningQuotaManager
MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.