Package com.icegreen.greenmail.store
Class MapBasedStoredMessageCollection
java.lang.Object
com.icegreen.greenmail.store.MapBasedStoredMessageCollection
- All Implemented Interfaces:
StoredMessageCollection,Iterable<StoredMessage>
- Author:
- Raimund Klein <raimund.klein@gmx.de>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(StoredMessage storedMessage) voidclear()voidexpunge(List<FolderListener> mailboxListeners) voidexpunge(List<FolderListener> mailboxListeners, IdRange[] idRanges) Expunges all messages flagged deleted and with UID in given ranges.get(int messageIndex) intgetMessages(MsgRangeFilter range) long[]intgetMsn(long uid) iterator()remove(long uid) intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MapBasedStoredMessageCollection
public MapBasedStoredMessageCollection(int maximumMapSize)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceStoredMessageCollection
-
add
- Specified by:
addin interfaceStoredMessageCollection
-
remove
- Specified by:
removein interfaceStoredMessageCollection
-
clear
public void clear()- Specified by:
clearin interfaceStoredMessageCollection
-
getFirstUnseen
public int getFirstUnseen()- Specified by:
getFirstUnseenin interfaceStoredMessageCollection
-
getMsn
- Specified by:
getMsnin interfaceStoredMessageCollection- Throws:
FolderException
-
getMessages
- Specified by:
getMessagesin interfaceStoredMessageCollection
-
getMessages
- Specified by:
getMessagesin interfaceStoredMessageCollection
-
getMessageUids
public long[] getMessageUids()- Specified by:
getMessageUidsin interfaceStoredMessageCollection
-
expunge
- Specified by:
expungein interfaceStoredMessageCollection
-
expunge
Description copied from interface:StoredMessageCollectionExpunges all messages flagged deleted and with UID in given ranges.- Specified by:
expungein interfaceStoredMessageCollection- Parameters:
mailboxListeners- folders to notify.idRanges- the UID message set ranges.
-
get
- Specified by:
getin interfaceStoredMessageCollection
-
iterator
- Specified by:
iteratorin interfaceIterable<StoredMessage>
-