R
- The generic type of the [R]elation elements.public abstract class AbstractSolutionBuffer<R> extends AbstractArrayBuffer<ISolution<R>[]>
IBuffer
whose target is a mutation (insert, delete, or
update) of some IMutableRelation
.
Note that this buffers chunks of ISolution
s NOT relation
elements.IMutableRelation
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSolutionBuffer.DeleteSolutionBuffer<E>
Buffer writes on
IMutableRelation.delete(IChunkedOrderedIterator) when it is
flushed . |
static class |
AbstractSolutionBuffer.InsertSolutionBuffer<E>
Buffer writes on
IMutableRelation#insert(IChunkedIterator) when it is
flushed . |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSolutionBuffer(int capacity,
IMutableRelation<R> relation) |
Modifier and Type | Method and Description |
---|---|
protected abstract long |
flush(IChunkedOrderedIterator<ISolution<R>> itr)
|
protected long |
flush(int n,
ISolution<R>[][] a)
Combines chunks of solutions together into a single chunk and then
delegates to
flush(IChunkedOrderedIterator) . |
protected IMutableRelation<R> |
getRelation() |
protected AbstractSolutionBuffer(int capacity, IMutableRelation<R> relation)
capacity
- protected IMutableRelation<R> getRelation()
protected final long flush(int n, ISolution<R>[][] a)
flush(IChunkedOrderedIterator)
.
Note: Combining chunks together is a huge performance win if the source chunks tend to be small (100). For example, this is true for scale-out joins such as LUBM U1 EDS. There the performance gain is better than 20:1.
flush
in class AbstractArrayBuffer<ISolution<R>[]>
n
- The #of elements in the array.a
- The array of elements.AbstractArrayBuffer.flush()
, this is not a
cumulative counter, but the #of modified elements in the relation
for this operation only).protected abstract long flush(IChunkedOrderedIterator<ISolution<R>> itr)
ISolution
s, causing
the appropriate mutation on the target IRelation
.
Note: The ISolution
s generally appear in an arbitrary order.
They can either be resolved to IRelation
elements or be sorted
into ordered ISolution
chunks using a SolutionComparator
.
itr
- The iterator (the order of the elements is unknown).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.