winstone
Class SizeRestrictedHashtable<K,V>
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,V>
winstone.SizeRestrictedHashtable<K,V>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
public class SizeRestrictedHashtable<K,V>
- extends java.util.Hashtable<K,V>
Hashtable
that sets the upper bound in the total number of keys.
This is to protect against the DoS attack based on the hash key collision.
See http://www.ocert.org/advisories/ocert-2011-003.html
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
Method Summary |
V |
put(K key,
V value)
|
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
SizeRestrictedHashtable
public SizeRestrictedHashtable(int initialCapacity,
float loadFactor,
int cap)
SizeRestrictedHashtable
public SizeRestrictedHashtable(int initialCapacity,
int cap)
SizeRestrictedHashtable
public SizeRestrictedHashtable(int cap)
SizeRestrictedHashtable
public SizeRestrictedHashtable(java.util.Map<? extends K,? extends V> t,
int cap)
put
public V put(K key,
V value)
- Specified by:
put
in interface java.util.Map<K,V>
- Overrides:
put
in class java.util.Hashtable<K,V>
Copyright © 2013. All Rights Reserved.