Class IndexMapStorageWriterListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,IK extends io.datarouter.model.key.primary.PrimaryKey<IK>,IE extends io.datarouter.model.index.IndexEntry<IK,IE,PK,D>,IF extends io.datarouter.model.serialize.fielder.DatabeanFielder<IK,IE>,IN extends SortedMapStorage.SortedMapStorageNode<IK,IE,IF>>
java.lang.Object
io.datarouter.storage.node.BaseNode<IK,IE,IF>
io.datarouter.storage.node.type.index.base.BaseIndexNode<PK,D,IK,IE,IF,IN>
io.datarouter.storage.node.type.index.IndexMapStorageWriterListener<PK,D,IK,IE,IF,IN>
- All Implemented Interfaces:
Node<IK,IE,IF>,IndexListener<PK,D>,Comparable<Node<IK,IE,IF>>
public class IndexMapStorageWriterListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,IK extends io.datarouter.model.key.primary.PrimaryKey<IK>,IE extends io.datarouter.model.index.IndexEntry<IK,IE,PK,D>,IF extends io.datarouter.model.serialize.fielder.DatabeanFielder<IK,IE>,IN extends SortedMapStorage.SortedMapStorageNode<IK,IE,IF>> extends BaseIndexNode<PK,D,IK,IE,IF,IN> implements IndexListener<PK,D>
This assumes that only PK fields are changed... It has no way of detecting changes in non primary key fields.
Also fine for cases where you never delete or modify records.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IndexMapStorageWriterListener(Supplier<IE> indexEntrySupplier, IN indexNode) -
Method Summary
Modifier and Type Method Description voidonDelete(PK key, Config config)voidonDeleteAll(Config config)voidonDeleteDatabean(D databean, Config config)voidonDeleteMulti(Collection<PK> keys, Config config)voidonDeleteMultiDatabeans(Collection<D> databeans, Config config)voidonPut(D databean, Config config)voidonPutMulti(Collection<D> databeans, Config config)Methods inherited from class io.datarouter.storage.node.type.index.base.BaseIndexNode
createIndexEntry, getBackingNode, getChildNodes, getClientIds, getName, getPhysicalNodes, getPhysicalNodesForClient, usesClient
-
Constructor Details
-
Method Details
-
onDelete
-
onDeleteDatabean
- Specified by:
onDeleteDatabeanin interfaceIndexListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
-
onDeleteAll
- Specified by:
onDeleteAllin interfaceIndexListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
-
onDeleteMulti
- Specified by:
onDeleteMultiin interfaceIndexListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
-
onDeleteMultiDatabeans
- Specified by:
onDeleteMultiDatabeansin interfaceIndexListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
-
onPut
-
onPutMulti
- Specified by:
onPutMultiin interfaceIndexListener<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
-