Package org.apache.cassandra.db.tries
Interface InMemoryTrie.UpsertTransformer<T,U>
- Type Parameters:
T- The content type for thisInMemoryTrie.U- The type of the new content being applied to thisInMemoryTrie.
- Enclosing class:
- InMemoryTrie<T>
public static interface InMemoryTrie.UpsertTransformer<T,U>
Somewhat similar to
Trie.MergeResolver, this encapsulates logic to be applied whenever new content is being
upserted into a InMemoryTrie. Unlike Trie.MergeResolver, InMemoryTrie.UpsertTransformer will be applied no
matter if there's pre-existing content for that trie key/path or not.-
Method Summary
-
Method Details
-
apply
Called when there's content in the updating trie.- Parameters:
existing- Existing content for this key, or null if there isn't any.update- The update, always non-null.- Returns:
- The combined value to use. Cannot be null.
-