Package com.illumon.iris.db.tables.libs
Class DbMap<K,V>
java.lang.Object
com.illumon.iris.db.tables.libs.DbMap<K,V>
- All Implemented Interfaces:
Externalizable,Serializable,Map<K,V>
- Direct Known Subclasses:
DbMapStringDouble,DbMapStringInt,DbMapStringLong,DbMapStringString
public abstract class DbMap<K,V> extends Object implements Map<K,V>, Externalizable
A map implementation optimized for DB use.
- See Also:
- Serialized Form
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedDbMap(boolean sortedToString) -
Method Summary
Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,V>>entrySet()booleanequals(Object o)Vget(Object key)inthashCode()booleanisEmpty()Set<K>keySet()Vput(K key, V value)voidputAll(Map<? extends K,? extends V> m)voidreadExternal(ObjectInput in)protected abstract KreadKey(ObjectInput in)protected abstract VreadValue(ObjectInput in)Vremove(Object key)intsize()StringtoString()Collection<V>values()voidwriteExternal(ObjectOutput out)protected abstract voidwriteKey(ObjectOutput out, K key)protected abstract voidwriteValue(ObjectOutput out, V value)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
DbMap
protected DbMap(boolean sortedToString)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
hashCode
public int hashCode() -
equals
-
toString
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeKey
- Throws:
IOException
-
readKey
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
readValue
- Throws:
IOException
-