Class GraphUpdateStatementSource
- All Implemented Interfaces:
ContextCopyStatementSource,StatementSource,Closeable,AutoCloseable
StatementSource that carries a GraphUpdateChange for a graph-level MOVE/COPY/ADD. The RDF index
describes the operation entirely by the GraphUpdateChange and does an ID-level context copy, so it never
reads these statements. A connectable that must reindex the moved data (e.g. the search index when a context filter
is crossed) can instead iterate the delegate — the source graph's statements, captured before a MOVE clears it —
when hasSource() is true. When no data is carried (e.g. a record reconstructed from the tx log on
replay) hasSource() is false and such a connectable falls back to a full rebuild.
It implements ContextCopyStatementSource (source graph via getSourceContext(), target via
getContext()) so existing context-to-context copy handling continues to apply.
- Since:
- 12.0
- Version:
- 12.0
- Author:
- Simon Gratzer
-
Field Summary
Fields inherited from interface com.complexible.common.rdf.StatementSource
NO_ESTIMATE -
Constructor Summary
ConstructorsConstructorDescriptionGraphUpdateStatementSource(GraphUpdateChange theChange) GraphUpdateStatementSource(GraphUpdateChange theChange, CancelCheck theCancelCheck) Carries the check of whatever asked for the update, so the connectable applying it stops when that process is cancelled and not only when its transaction is.GraphUpdateStatementSource(GraphUpdateChange theChange, StatementSource theSource, CancelCheck theCancelCheck) -
Method Summary
Modifier and TypeMethodDescriptionReturn the context these statements belong to.Returns the graph-level change this source represents.booleanWhether the source graph's statements are carried on this change (so a connectable can reindex the moved data without a full rebuild).Methods inherited from class com.complexible.common.rdf.DelegatingStatementSource
close, containsVirtual, estimatedCount, getSource, inMemory, isReusable, statements, streamsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.complexible.common.rdf.ContextCopyStatementSource
getTargetContextMethods inherited from interface com.complexible.common.rdf.StatementSource
containsVirtual, estimatedCount, inMemory, isReusable, statements, streams
-
Constructor Details
-
GraphUpdateStatementSource
-
GraphUpdateStatementSource
Carries the check of whatever asked for the update, so the connectable applying it stops when that process is cancelled and not only when its transaction is. A record replayed from the tx log or received from another node has no such process and carriesCancelCheck.DUMMY. -
GraphUpdateStatementSource
public GraphUpdateStatementSource(GraphUpdateChange theChange, StatementSource theSource, CancelCheck theCancelCheck) - See Also:
-
-
Method Details
-
cancelCheck
- Returns:
- the check of the process which asked for this update, or
CancelCheck.DUMMYif it did not come from one (replay, replication)
-
graphUpdate
Returns the graph-level change this source represents. -
hasSource
public boolean hasSource()Whether the source graph's statements are carried on this change (so a connectable can reindex the moved data without a full rebuild).falsewhen the change carries no data (e.g. reconstructed from the tx log). -
getContext
Return the context these statements belong to. When non-null, this should override the context specified on the statements themselves.- Specified by:
getContextin interfaceStatementSource- Overrides:
getContextin classDelegatingStatementSource- Returns:
- the context of all the statements from this source, or `null` if there is no context (for all of them) or they each have their own context specified.
-
getSourceContext
- Specified by:
getSourceContextin interfaceContextCopyStatementSource
-