public class HashMapDb extends Object implements ILispDAO, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
HashMapDb() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,Object> |
get(Object key)
Get the entries from the DAO.
|
void |
getAll(IRowVisitor visitor)
Enumerate all the entries from the DAO.
|
Map<String,Object> |
getBest(Object key)
Get value for longest prefix match from the DAO.
|
AbstractMap.SimpleImmutableEntry<Eid,Map<String,?>> |
getBestPair(Object key)
Get longest prefix match and value from the DAO.
|
Eid |
getCoveringLessSpecific(Eid key)
Look up the covering prefix for the argument, but exclude the argument itself, so the result is always less
specific than the lookup key.
|
Eid |
getParentPrefix(Eid key)
Get parent prefix.
|
Eid |
getSiblingPrefix(Eid key)
Get sibling prefix.
|
Object |
getSpecific(Object key,
String valueKey)
Get a specific value from the DAO.
|
Set<Eid> |
getSubtree(Eid key)
Get the subtree of the given prefix.
|
Eid |
getVirtualParentSiblingPrefix(Eid key)
Get virtual parent sibling prefix.
|
Eid |
getWidestNegativePrefix(Eid key)
Get widest negative prefix.
|
boolean |
isEmpty()
Check if the DAO is empty.
|
void |
put(Object key,
MappingEntry<?>... values)
Put a entry into the DAO.
|
ILispDAO |
putNestedTable(Object key,
String valueKey)
Inserts a new, nested table for given key and subkey.
|
ILispDAO |
putTable(String key)
Insert a new table for given key.
|
void |
remove(Object key)
Remove an entry from the DAO.
|
void |
removeAll()
Clear the DAO and remove all of the entries.
|
void |
removeSpecific(Object key,
String valueKey)
Remove an entry from the DAO.
|
void |
tryAddToIpTrie(Object key) |
public void tryAddToIpTrie(Object key)
public void put(Object key, MappingEntry<?>... values)
ILispDAOpublic Object getSpecific(Object key, String valueKey)
ILispDAOgetSpecific in interface ILispDAOkey - The key of the value to fetchvalueKey - The value to fetchpublic Map<String,Object> get(Object key)
ILispDAOpublic Map<String,Object> getBest(Object key)
ILispDAOpublic AbstractMap.SimpleImmutableEntry<Eid,Map<String,?>> getBestPair(Object key)
ILispDAOgetBestPair in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalizedpublic void getAll(IRowVisitor visitor)
ILispDAOpublic Eid getCoveringLessSpecific(Eid key)
ILispDAOgetCoveringLessSpecific in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Eid getParentPrefix(Eid key)
ILispDAOgetParentPrefix in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Eid getSiblingPrefix(Eid key)
ILispDAOgetSiblingPrefix in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Eid getVirtualParentSiblingPrefix(Eid key)
ILispDAOgetVirtualParentSiblingPrefix in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Eid getWidestNegativePrefix(Eid key)
ILispDAOgetWidestNegativePrefix in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Set<Eid> getSubtree(Eid key)
ILispDAOgetSubtree in interface ILispDAOkey - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public void remove(Object key)
ILispDAOpublic void removeSpecific(Object key, String valueKey)
ILispDAOremoveSpecific in interface ILispDAOkey - The key of the entryvalueKey - The value to deletepublic void removeAll()
ILispDAOpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic ILispDAO putNestedTable(Object key, String valueKey)
ILispDAOputNestedTable in interface ILispDAOkey - The key for which a new table is linked invalueKey - The subkey under which to insert the new tablepublic ILispDAO putTable(String key)
ILispDAOCopyright © 2019 OpenDaylight. All rights reserved.