| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mailrepository.javamail.HashJavamailStoreMailRepository.KeyToMsgMap
protected class HashJavamailStoreMailRepository.KeyToMsgMap
| Field Summary | |
|---|---|
protected  java.util.Map | 
hashToMsgObj
 | 
protected  java.util.Map | 
keyToMsgObj
 | 
protected  java.util.SortedMap | 
noToMsgObj
 | 
| Constructor Summary | |
|---|---|
protected  | 
HashJavamailStoreMailRepository.KeyToMsgMap()
 | 
| Method Summary | |
|---|---|
 boolean | 
contains(java.lang.String key)
Return true if a MsgObj is stored with the given key  | 
 HashJavamailStoreMailRepository.MsgObj | 
getByKey(java.lang.String key)
Return the MsgObj associted with the given key  | 
 java.lang.String[] | 
getKeys()
Return an String[] of all stored keys  | 
 HashJavamailStoreMailRepository.MsgObj | 
getMsgObj(java.lang.String key)
TODO: Check why we have to methods which do the same  | 
 java.lang.String | 
getStat()
only used for debugging  | 
 HashJavamailStoreMailRepository.MsgObj | 
put(javax.mail.internet.MimeMessage mm,
    java.lang.String key,
    int no)
At first it tries to lookup message by key otherwise by hash or stores it as new  | 
 void | 
removeByKey(java.lang.String key,
            boolean decrement)
removes a message from the maps.  | 
 void | 
retainAllListedAndAddedByKeys(java.lang.String[] keysBefore,
                              java.lang.String[] listed)
Cleans up database after rehash.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.SortedMap noToMsgObj
protected java.util.Map keyToMsgObj
protected java.util.Map hashToMsgObj
| Constructor Detail | 
|---|
protected HashJavamailStoreMailRepository.KeyToMsgMap()
| Method Detail | 
|---|
public boolean contains(java.lang.String key)
key - the key
public void retainAllListedAndAddedByKeys(java.lang.String[] keysBefore,
                                          java.lang.String[] listed)
keysBefore - keys that have exist before rehash was calledlisted - keys that have listed by rehashpublic java.lang.String getStat()
public void removeByKey(java.lang.String key,
                        boolean decrement)
key - key of messagedecrement - if true, all message number greater than this are
            decrementedpublic java.lang.String[] getKeys()
public HashJavamailStoreMailRepository.MsgObj getByKey(java.lang.String key)
key - the key
public HashJavamailStoreMailRepository.MsgObj put(javax.mail.internet.MimeMessage mm,
                                                  java.lang.String key,
                                                  int no)
                                           throws javax.mail.MessagingException
mm - messagekey - if null it will be generated when not found by hashno - current number of this message
javax.mail.MessagingExceptionpublic HashJavamailStoreMailRepository.MsgObj getMsgObj(java.lang.String key)
getByKey(String)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||