|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Service
javax.mail.Store
org.abstracthorizon.mercury.maildir.MaildirStore
org.abstracthorizon.mercury.maildir.uid.UIDMaildirStore
public class UIDMaildirStore
This store implementation is aggressive UID implementation.
It maintains UIDs within file names instead using separate index file.
Each file added to the store must have precisely defined name
(see UIDMaildirMessage
)
or while being added its name will be changed to conform to it.
Consequences of such store's behaviour are quicker, less complicated maintenance of UID and mapping from UIDs to messages; simple tracking of externally removed and added messages. Negative side is that external application would see messages disappearing when added to the store and new messages with exactly the same content appearing after (while) this store is executing over same directory.
Only two files that this store needs are ".nextuid" where the last uid number is stored and ".uidvalidity" where folder's uid validity is stored.
Field Summary | |
---|---|
static String |
NEXT_UID_FILE
Name of a file storing next uid number |
static String |
UID_VALIDITY_FILE
Name of a file storing folder's uid validity |
Fields inherited from class org.abstracthorizon.mercury.maildir.MaildirStore |
---|
base, directories, HOME, HTTP_SYNTAX, httpSyntax, INFO_SEPARATOR, infoSeparator, LEADING_DOT, leadingDot, MAX_FOLDER_DATA_LIFE |
Fields inherited from class javax.mail.Service |
---|
debug, session, url |
Constructor Summary | |
---|---|
UIDMaildirStore(javax.mail.Session session,
javax.mail.URLName urlname)
Constructor |
Method Summary | |
---|---|
protected MaildirFolder |
createFolder(MaildirFolderData folderData)
This implementation creates UIDMaildirFolder |
protected MaildirFolderData |
createFolderData(File file)
This implementation creates UIDMaildirFolderData from supplied file. |
Methods inherited from class org.abstracthorizon.mercury.maildir.MaildirStore |
---|
createBaseFile, getBaseFile, getDefaultFolder, getFolder, getFolder, getFolderData, getFolderData, getInfoSeparator, getParentFolder, isHttpSyntax, isLeadingDot, parseURLName, processParam, protocolConnect, replace |
Methods inherited from class javax.mail.Store |
---|
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener |
Methods inherited from class javax.mail.Service |
---|
addConnectionListener, close, connect, connect, connect, connect, finalize, getURLName, isConnected, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NEXT_UID_FILE
public static final String UID_VALIDITY_FILE
Constructor Detail |
---|
public UIDMaildirStore(javax.mail.Session session, javax.mail.URLName urlname)
session
- mail sessionurlname
- url nameMethod Detail |
---|
protected MaildirFolder createFolder(MaildirFolderData folderData)
UIDMaildirFolder
createFolder
in class MaildirStore
folderData
- folder data
protected MaildirFolderData createFolderData(File file)
UIDMaildirFolderData
from supplied file.
createFolderData
in class MaildirStore
file
- file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |