org.mapdb
Interface Bind.MapWithModificationListener<K,V>

Type Parameters:
K - key type in map
V - value type in map
All Superinterfaces:
Map<K,V>
All Known Implementing Classes:
BTreeMap, HTreeMap
Enclosing class:
Bind

public static interface Bind.MapWithModificationListener<K,V>
extends Map<K,V>

Primary Maps must provide notifications when it is modified. So Primary Maps must implement this interface to allow registering callback listeners.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 void modificationListenerAdd(Bind.MapListener<K,V> listener)
          Add new modification listener notified when Map has been updated
 void modificationListenerRemove(Bind.MapListener<K,V> listener)
          Remove registered notification listener
 long sizeLong()
           
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

modificationListenerAdd

void modificationListenerAdd(Bind.MapListener<K,V> listener)
Add new modification listener notified when Map has been updated

Parameters:
listener - callback interface notified when map changes

modificationListenerRemove

void modificationListenerRemove(Bind.MapListener<K,V> listener)
Remove registered notification listener

Parameters:
listener - callback interface notified when map changes

sizeLong

long sizeLong()
Returns:
size of map, but in 64bit long which does not overflow at 2e9 items.


Copyright © 2014. All Rights Reserved.