Package com.db4o.collections
Class ActivatableHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- com.db4o.collections.ActivatableHashMap<K,V>
-
- All Implemented Interfaces:
ActivatableMap<K,V>
,Activatable
,java.io.Serializable
,java.lang.Cloneable
,java.util.Map<K,V>
public class ActivatableHashMap<K,V> extends java.util.HashMap<K,V> implements ActivatableMap<K,V>
extends HashMap with Transparent Activation and Transparent Persistence support- Since:
- 7.9
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActivatableHashMap()
ActivatableHashMap(int initialCapacity)
ActivatableHashMap(int initialCapacity, float loadFactor)
ActivatableHashMap(java.util.Map<? extends K,? extends V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(ActivationPurpose purpose)
Should be called by every reading field access of an object.void
bind(Activator activator)
Called by db4o after the object instantiation.void
clear()
java.lang.Object
clone()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object o)
V
get(java.lang.Object key)
int
hashCode()
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
activate
public void activate(ActivationPurpose purpose)
Description copied from interface:Activatable
Should be called by every reading field access of an object.
The recommended implementation of this method is to callActivator.activate(ActivationPurpose)
on theActivator
that was previously passed toActivatable.bind(Activator)
.- Specified by:
activate
in interfaceActivatable
- Parameters:
purpose
- Whereever this object is accessed to read or write. SeeActivationPurpose
-
bind
public void bind(Activator activator)
Description copied from interface:Activatable
Called by db4o after the object instantiation. This method is called to bind the object to the current activator
The recommended implementation of this method is to store the passedActivator
in a transient field of the object.- Specified by:
bind
in interfaceActivatable
- Parameters:
activator
- the Activator instance to bind
-
clear
public void clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
get
public V get(java.lang.Object key)
-
isEmpty
public boolean isEmpty()
-
keySet
public java.util.Set<K> keySet()
-
remove
public V remove(java.lang.Object key)
-
size
public int size()
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object o)
-
-