KEY - type of keysVALUE - type of valuespublic interface Writer<KEY,VALUE> extends Closeable
merge(Object, Object, ValueMerger) and remove(Object) key/value pairs
into a GBPTree. After all modifications have taken place the writer must be closed,
typically using try-with-resource clause.| Modifier and Type | Method and Description |
|---|---|
void |
merge(KEY key,
VALUE value,
ValueMerger<VALUE> valueMerger)
If the
key doesn't already exist in the index the key will be added and the value
associated with it. |
void |
put(KEY key,
VALUE value)
Associate given
key with given value. |
VALUE |
remove(KEY key)
Removes a key, returning it's associated value, if found.
|
void put(KEY key, VALUE value) throws IOException
key with given value.
Any existing value associated with key will be overwritten.key - key to associate with valuevalue - value to associate with keyIOException - on index access error.void merge(KEY key, VALUE value, ValueMerger<VALUE> valueMerger) throws IOException
key doesn't already exist in the index the key will be added and the value
associated with it. If the key already exists then its existing value will be merged with
the given value, using the ValueMerger. If the ValueMerger returns a non-null
value that value will be associated with the key, otherwise (if it returns null) nothing will
be written.key - key for which to merge values.value - value to merge with currently associated value for the key.valueMerger - ValueMerger to consult if key already exists.IOException - on index access error.VALUE remove(KEY key) throws IOException
key - key to remove.null.IOException - on index access error.Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.