SK.gnome.dwarf.mail.store
Class SyncFileMailStore

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.mail.store.GenericFileStore
          extended bySK.gnome.dwarf.mail.store.FileMailStore
              extended bySK.gnome.dwarf.mail.store.SyncFileMailStore
All Implemented Interfaces:
MailStore, SK.gnome.dwarf.Service

public class SyncFileMailStore
extends FileMailStore

This class provides a synchronized filesystem-based mail store.

It is totally compatible with the extended FileMailStore, but provides full simultaneous access to mailboxes with no exceptions. There is always only one shared MailFolder instance per mailbox and user, therefore the consecutive openings of the same folder are very fast and do not consume an additional memory. This is for the price of a slight synchronization CPU overhead.

It is not possible to mix FileMailStore and SyncFileMailStore in one server application. You must use the SyncFileMailStore for all servers in the same JVM instance!

We generally recommend to use this mail store for most of the installations.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.mail.store.GenericFileStore
autoCreate, backupObjects, letterSubdirs, userBaseDir
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
SyncFileMailStore(java.lang.String name)
          Creates a new SyncFileMailStore.
 
Method Summary
 MailFolder getDefaultFolder(java.lang.String user)
          Returns a default folder for the given user.
 void init(SK.gnome.dwarf.Server parent)
           
 
Methods inherited from class SK.gnome.dwarf.mail.store.FileMailStore
addMailEventListener, dispatchMailEvent, getPreloadLimit, getSharedAccess, getSharedDefaultFolder, getSharedPrefix, removeMailEventListener, setPreloadLimit, setSharedAccess, setSharedPrefix, setSharedUser
 
Methods inherited from class SK.gnome.dwarf.mail.store.GenericFileStore
create, exists, getUserDirectory, listUsers, lock, readObject, remove, setAutoCreate, setBackupObjects, setLetterSubdirs, setUserBaseDir, storeObject, unlock
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface SK.gnome.dwarf.mail.store.MailStore
create, exists, listUsers, remove
 

Constructor Detail

SyncFileMailStore

public SyncFileMailStore(java.lang.String name)
Creates a new SyncFileMailStore.

Method Detail

init

public void init(SK.gnome.dwarf.Server parent)
          throws SK.gnome.dwarf.ServiceException
Specified by:
init in interface SK.gnome.dwarf.Service
Overrides:
init in class GenericFileStore
Throws:
SK.gnome.dwarf.ServiceException

getDefaultFolder

public MailFolder getDefaultFolder(java.lang.String user)
                            throws MailException
Description copied from interface: MailStore
Returns a default folder for the given user.

Specified by:
getDefaultFolder in interface MailStore
Overrides:
getDefaultFolder in class FileMailStore
Throws:
MailException


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.