public enum NameLookupCacheHolder extends java.lang.Enum<NameLookupCacheHolder> implements NameLookupCache
Implementaton of NameLookupCache using the Domino backend classes
Enum Constant and Description |
---|
INSTANCE
Lookup cache instance as Singleton
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String notesName,
java.lang.String eMail)
Manually adds a cache entry into the caches
|
void |
clear()
Clears the cache of all current members
|
boolean |
evict(java.lang.String key)
Removes an entry from cache removing a non-existing key is still a success
|
void |
evict(java.lang.String notesName,
java.lang.String eMail)
Removes an cache entry from both Name and eMail lookup
|
java.util.Optional<java.lang.String> |
getEmailFromNotesName(com.hcl.domino.DominoClient client,
java.lang.String notesName,
boolean ignoreCache)
Retrieve the Internet eMail associated with a NotesName
|
java.util.Optional<java.lang.String> |
getNotesNameFromEmail(com.hcl.domino.DominoClient client,
java.lang.String eMailString,
boolean ignoreCache)
Retrieve a NotesName from an eMailId
|
boolean |
hasEntry(java.lang.String key)
Is a specific entry in the cache?
|
long |
size() |
java.util.Set<java.lang.String> |
toEMail(com.hcl.domino.DominoClient client,
java.util.Collection<java.lang.String> source)
Translates a set of NotesName / eMail mix to eMails When an eMail is not found, the un-converted Name (which could be a group) gets returned
|
java.util.Set<java.lang.String> |
toNotesName(com.hcl.domino.DominoClient client,
java.util.Collection<java.lang.String> source)
Translates a set of eMails to NotesNames When an NotesName is not found, the un-converted eMail gets returned
|
static NameLookupCacheHolder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NameLookupCacheHolder[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getEmailFromNotesName, getNotesNameFromEmail, toEMailJson
getCachePrefix
public static final NameLookupCacheHolder INSTANCE
public static NameLookupCacheHolder[] values()
for (NameLookupCacheHolder c : NameLookupCacheHolder.values()) System.out.println(c);
public static NameLookupCacheHolder valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void add(java.lang.String notesName, java.lang.String eMail)
NameLookupCache
Manually adds a cache entry into the caches
add
in interface NameLookupCache
public void clear()
KeepBaseCache
Clears the cache of all current members
clear
in interface KeepBaseCache
public boolean evict(java.lang.String key)
KeepBaseCache
Removes an entry from cache removing a non-existing key is still a success
evict
in interface KeepBaseCache
key
- public void evict(java.lang.String notesName, java.lang.String eMail)
NameLookupCache
Removes an cache entry from both Name and eMail lookup
evict
in interface NameLookupCache
public java.util.Optional<java.lang.String> getEmailFromNotesName(com.hcl.domino.DominoClient client, java.lang.String notesName, boolean ignoreCache)
NameLookupCache
Retrieve the Internet eMail associated with a NotesName
getEmailFromNotesName
in interface NameLookupCache
client
- DominoClientnotesName
- a fully qualified Notes Name (X500) e.g. CN=John Doe/OU=Alpha/O=Acme CorpignoreCache
- public java.util.Optional<java.lang.String> getNotesNameFromEmail(com.hcl.domino.DominoClient client, java.lang.String eMailString, boolean ignoreCache)
NameLookupCache
Retrieve a NotesName from an eMailId
getNotesNameFromEmail
in interface NameLookupCache
client
- DominoClienteMailString
- ignoreCache
- public boolean hasEntry(java.lang.String key)
KeepBaseCache
Is a specific entry in the cache?
hasEntry
in interface KeepBaseCache
key
- public long size()
public java.util.Set<java.lang.String> toEMail(com.hcl.domino.DominoClient client, java.util.Collection<java.lang.String> source)
NameLookupCache
Translates a set of NotesName / eMail mix to eMails When an eMail is not found, the un-converted Name (which could be a group) gets returned
toEMail
in interface NameLookupCache
public java.util.Set<java.lang.String> toNotesName(com.hcl.domino.DominoClient client, java.util.Collection<java.lang.String> source)
NameLookupCache
Translates a set of eMails to NotesNames When an NotesName is not found, the un-converted eMail gets returned
toNotesName
in interface NameLookupCache