@FunctionalInterface public interface ChangeObserver<K,V>
CombineQueue
uses this interface to notify of changes to a keys value. It provides the
new and old value for a key. For efficiency, the CombineQueue
processes batches of key
updates at once. It is strongly advised to only use the passed in transaction for writes that are
unlikely to collide. If one write collides, then it will cause the whole batch to fail. Examples
of writes that will not collide are updating an ExportQueue
or another
CombineQueue
.
It was advised to only do writes because reads for each key will slow down processing a batch. If reading data is necessary then consider doing batch reads.
Modifier and Type | Interface and Description |
---|---|
static interface |
ChangeObserver.Change<K2,V2> |
Modifier and Type | Method and Description |
---|---|
void |
process(org.apache.fluo.api.client.TransactionBase tx,
Iterable<ChangeObserver.Change<K,V>> changes) |
void process(org.apache.fluo.api.client.TransactionBase tx, Iterable<ChangeObserver.Change<K,V>> changes)
Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.