|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.memory.TransientMultiValueIndex
This class implements MultiValueIndex on top of Maps and Sets.
Use it to create in-memory indicies to help create quicker Diggers.
Field Summary | |
private MutableMap |
idsToKeys
|
private MutableMap |
keysToSets
|
Constructor Summary | |
TransientMultiValueIndex()
|
Method Summary | |
void |
clear()
|
boolean |
containsIdentifier(java.io.Serializable id)
|
boolean |
containsKey(java.lang.Object key)
|
int |
countIdentifiersForKey(java.lang.Object key)
|
protected MutableMap |
createIDsToKeys()
|
protected MutableMap |
createKeysToSets()
|
protected MutableSetOfFreezables |
createSet()
|
SetOfFreezables |
get(java.lang.Object key)
Returns an immutable Set. |
Set |
getKeys()
|
boolean |
isEmpty()
Returns true if this collection contains no elements. |
java.util.Iterator |
keyIterator()
|
void |
put(java.lang.Object key,
java.io.Serializable id)
Puts the key id pair into the index. |
void |
remove(java.io.Serializable id)
Removes the id from the index. |
int |
size()
Returns the number keys in this index |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private MutableMap keysToSets
private MutableMap idsToKeys
Constructor Detail |
public TransientMultiValueIndex()
Method Detail |
protected MutableMap createKeysToSets()
protected MutableMap createIDsToKeys()
protected MutableSetOfFreezables createSet()
public int size()
MultiValueIndex
size
in interface MultiValueIndex
public boolean isEmpty()
MultiValueIndex
isEmpty
in interface MultiValueIndex
public boolean containsKey(java.lang.Object key)
containsKey
in interface MultiValueIndex
public int countIdentifiersForKey(java.lang.Object key)
countIdentifiersForKey
in interface MultiValueIndex
public boolean containsIdentifier(java.io.Serializable id)
containsIdentifier
in interface MultiValueIndex
public SetOfFreezables get(java.lang.Object key)
MultiValueIndex
get
in interface MultiValueIndex
public void put(java.lang.Object key, java.io.Serializable id)
MultiValueIndex
put
in interface MultiValueIndex
public void remove(java.io.Serializable id)
MultiValueIndex
remove
in interface MultiValueIndex
public void clear()
clear
in interface MultiValueIndex
public Set getKeys()
getKeys
in interface MultiValueIndex
public java.util.Iterator keyIterator()
keyIterator
in interface MultiValueIndex
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |