| Modifier and Type | Class and Description |
|---|---|
| public static interface | TernarySearchTree.
type of values Value>Loader to load key-value pairs to be cached in the tree |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ReadWriteLock | |
| private TernarySearchTree. | |
| private final AtomicInteger | |
| private static final char |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public int | |
| public int | |
| private void | |
| private void | findKeysWithPrefix(TernarySearchTree.
|
| private void | |
| private void | findWithPrefix(TernarySearchTree.
|
| public Value | |
| private TernarySearchTree. | |
| public Map | |
| public List | |
| public Iterable | |
| public Iterable | Returns: keys matching given pattern.search pattern pattern)Get keys matching given pattern using '?' as wildcard character. |
| public Iterable | Returns: keys starting with given prefixkey prefix prefix)Get keys starting with given prefix |
| public ReadWriteLock | Returns: lock guarding read and write access to the cacheGet the lock guarding read and write access to the cache. |
| public List | Returns: entries with given prefixkey prefix prefix)Get all values with given key prefix |
| public Map | Returns: entries with given prefixkey prefix prefix)Get all entries with given prefix |
| public int | |
| public int | |
| private TernarySearchTree. | |
| private void | |
| public String | Returns: the key which is the longest prefix of the given query string ornull if none exists.the query string query)Find the key which is the longest prefix of the given query string. |
| public int | |
| public int | |
| public int | |
| private static void | |
| private static <V> void |
| lock | back to summary |
|---|---|
| private final ReadWriteLock lock | |
| root | back to summary |
|---|---|
| private TernarySearchTree. | |
| size | back to summary |
|---|---|
| private final AtomicInteger size | |
| WILDCARD | back to summary |
|---|---|
| private static final char WILDCARD | |
| TernarySearchTree | back to summary |
|---|---|
| public TernarySearchTree() Construct a new ternary search tree | |
| clear | back to summary |
|---|---|
| public void clear() Remove all key value pairs from this tree | |
| contains | back to summary |
|---|---|
| public boolean contains(String key) Check whether this tree contains the given key.
| |
| delete | back to summary |
|---|---|
| public int delete(Iterable<String> delete) Delete entries | |
| delete | back to summary |
|---|---|
| public int delete(String key) Delete a key-value pair. Does nothing if the key doesn't exist.
| |
| findKeysWithPrefix | back to summary |
|---|---|
| private void findKeysWithPrefix(TernarySearchTree. | |
| findKeysWithPrefix | back to summary |
|---|---|
| private void findKeysWithPrefix(TernarySearchTree. | |
| findValuesWithPrefix | back to summary |
|---|---|
| private void findValuesWithPrefix(TernarySearchTree. | |
| findWithPrefix | back to summary |
|---|---|
| private void findWithPrefix(TernarySearchTree. | |
| get | back to summary |
|---|---|
| public Value get(String key) Get the value associated to a key or | |
| get | back to summary |
|---|---|
| private TernarySearchTree. | |
| getAll | back to summary |
|---|---|
| public Map Get all entries. | |
| getAllValues | back to summary |
|---|---|
| public List Get all values.
| |
| getKeys | back to summary |
|---|---|
| public Iterable Get all keys. | |
| getKeysMatching | back to summary |
|---|---|
| public Iterable Get keys matching given pattern using '?' as wildcard character. | |
| getKeysWithPrefix | back to summary |
|---|---|
| public Iterable Get keys starting with given prefix | |
| getLock | back to summary |
|---|---|
| public ReadWriteLock getLock() Get the lock guarding read and write access to the cache.
| |
| getValuesWithPrefix | back to summary |
|---|---|
| public List Get all values with given key prefix | |
| getWithPrefix | back to summary |
|---|---|
| public Map Get all entries with given prefix | |
| insert | back to summary |
|---|---|
| public int insert(String key, Value value) Insert a key-value pair. If the key already exists the old value is overwritten.
| |
| insert | back to summary |
|---|---|
| public int insert(Map<String, Value> map) Insert map of key-value pairs. Values of existing keys are overwritten. Use this method to insert multiple key-value pairs. | |
| insert | back to summary |
|---|---|
| private TernarySearchTree. | |
| insertImpl | back to summary |
|---|---|
| private void insertImpl(String key, Value value) | |
| keyLongestPrefixOf | back to summary |
|---|---|
| public String keyLongestPrefixOf(String query) Find the key which is the longest prefix of the given query string. | |
| reload | back to summary |
|---|---|
| public int reload(Iterable<Map. Reload the tree entries provided by loader | |
| replace | back to summary |
|---|---|
| public int replace(Iterable<Map. Replace the tree with a new tree containing all entries provided by an iterable | |
| size | back to summary |
|---|---|
| public int size() Get the number of key value pairs in this trie
| |
| validateKey | back to summary |
|---|---|
| private static void validateKey(String key) | |
| validateValue | back to summary |
|---|---|
| private static <V> void validateValue(V value) | |
| loadAll | back to summary |
|---|---|
| public Map Load map of all key value pairs | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final char | |
| pack-priv TernarySearchTree. | |
| pack-priv TernarySearchTree. | |
| pack-priv TernarySearchTree. | |
| pack-priv Value |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean |
| c | back to summary |
|---|---|
| pack-priv final char c | |
| eq | back to summary |
|---|---|
| pack-priv TernarySearchTree. | |
| hi | back to summary |
|---|---|
| pack-priv TernarySearchTree. | |
| lo | back to summary |
|---|---|
| pack-priv TernarySearchTree. | |
| val | back to summary |
|---|---|
| pack-priv Value val | |
| Node | back to summary |
|---|---|
| pack-priv Node(char c) | |
| hasValue | back to summary |
|---|---|
| pack-priv boolean hasValue() | |