public interface IBindingSetEncoder
IBindingSet
s comprised of IV
s. The
interface is slightly more complicated than it otherwise would be due to (a)
IVCache
and (b) the need to vector operations.
Encoding schemes tend to rely on IVUtility
to provide fast and
efficient encode / decode. This is the same representation which is used in
the statement indices.
The IVCache
interface may be used to associate a materialized
BigdataValue
with an IV
. In order to have efficient encode /
decode of IV
s which preserves the IVCache
information, the
encoding scheme also needs to store this association somewhere.
Encoders designed for the wire should store the IVCache
association
in an inline representation. Encoders designed for main memory (for example,
vectored operations in hash joins) can use persistence capable data
structures to store the IVCache
association.
IBindingSetDecoder
Modifier and Type | Method and Description |
---|---|
byte[] |
encodeSolution(IBindingSet bset)
|
byte[] |
encodeSolution(IBindingSet bset,
boolean updateCache)
Encode the solution as an
IV []. |
void |
flush()
Flush any updates.
|
boolean |
isValueCache()
Return
true iff the IVCache associations are
preserved by the encoder. |
void |
release()
Release the state associated with the
IVBindingSetEncoder . |
boolean isValueCache()
true
iff the IVCache
associations are
preserved by the encoder.byte[] encodeSolution(IBindingSet bset)
bset
- The solution to be encoded.byte[] encodeSolution(IBindingSet bset, boolean updateCache)
IV
[].
Note: The IVCache
associations may be buffered by this method.
Use flush()
to vector any buffered associations.
bset
- The solution to be encoded.updateCache
- When true
, updates are accumulated for the
IV
to BigdataValue
cache. You must still use
flush()
to vector the accumulated updates.
If you are only generating the encoding in order to resolve a
key in a hash index, then you would use false
since you do not need to maintain the IVCache
association for the given IBindingSet
.
void flush()
IVCache
associations.void release()
IVBindingSetEncoder
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.