Class CNonceCacheImpl
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,NonceInfo>
-
- com.sun.enterprise.security.auth.digest.impl.CNonceCacheImpl
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,NonceInfo>,CNonceCache
@Service(name="CNonceCache") @PerLookup public final class CNonceCacheImpl extends LinkedHashMap<String,NonceInfo> implements CNonceCache
- Author:
- vbkumarjayanti
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description CNonceCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()destroylonggetCnonceCacheSize()StringgetEldestCNonce()longgetNonceValidity()voidinit(long size, String name, long validity, Map<String,String> props)Initialize the cacheprotected booleanremoveEldestEntry(Map.Entry<String,NonceInfo> eldest)voidsetCnonceCacheSize(long cnonceCacheSize)voidsetNonceValidity(long nonceValidity)-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
init
public void init(long size, String name, long validity, Map<String,String> props)Description copied from interface:CNonceCacheInitialize the cache- Specified by:
initin interfaceCNonceCache
-
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<String,NonceInfo> eldest)
- Overrides:
removeEldestEntryin classLinkedHashMap<String,NonceInfo>
-
getCnonceCacheSize
public long getCnonceCacheSize()
- Specified by:
getCnonceCacheSizein interfaceCNonceCache- Returns:
- the cnonceCacheSize
-
getNonceValidity
public long getNonceValidity()
- Specified by:
getNonceValidityin interfaceCNonceCache- Returns:
- the nonceValidity
-
getEldestCNonce
public String getEldestCNonce()
- Returns:
- the eldestCNonce
-
setCnonceCacheSize
public void setCnonceCacheSize(long cnonceCacheSize)
- Specified by:
setCnonceCacheSizein interfaceCNonceCache- Parameters:
cnonceCacheSize- the cnonceCacheSize to set
-
setNonceValidity
public void setNonceValidity(long nonceValidity)
- Specified by:
setNonceValidityin interfaceCNonceCache- Parameters:
nonceValidity- the nonceValidity to set
-
destroy
public void destroy()
Description copied from interface:CNonceCachedestroy- Specified by:
destroyin interfaceCNonceCache
-
-