Modifier and Type | Field and Description |
---|---|
static boolean |
PACK_TIDS
When
true , we will pack term identifiers using
LongPacker . |
Constructor and Description |
---|
IVUtility() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(IV iv1,
IV iv2)
This provides a dumb comparison across IVs.
|
static IV |
decode(byte[] key)
Decode an
IV from a byte[]. |
static IV[] |
decode(byte[] key,
int numTerms)
Decodes up to numTerms
IV s from a byte[]. |
static IV[] |
decode(byte[] key,
int offset,
int numTerms)
Decodes up to numTerms
IV s from a byte[]. |
static IV[] |
decodeAll(byte[] key)
Decodes all
IV s from a byte[]. |
static IV[] |
decodeAll(byte[] key,
int off,
int len)
Decodes
IV s from a slice of a byte[]. |
static IV |
decodeFromOffset(byte[] key,
int offset)
Decode one
IV . |
static IV |
decodeFromOffset(byte[] key,
int offset,
boolean nullIsNullRef)
Decode one
IV . |
static IKeyBuilder |
encode(IKeyBuilder keyBuilder,
IV iv)
Encode an RDF value into a key for one of the statement indices.
|
static boolean |
equals(IV iv1,
IV iv2) |
public static final boolean PACK_TIDS
true
, we will pack term identifiers using
LongPacker
.
Note: This option requires that term identifiers are non-negative. That
is not currently true for the cluster due to the TermIdEncoder
.
public static IKeyBuilder encode(IKeyBuilder keyBuilder, IV iv)
IV
references gracefully.keyBuilder
- The key builder.iv
- The internal value (can be null
).public static IV decode(byte[] key)
IV
from a byte[].key
- The byte[].IV
.public static IV[] decode(byte[] key, int numTerms)
IV
s from a byte[].key
- The byte[].numTerms
- The number of terms to decode.IV
s.public static IV[] decode(byte[] key, int offset, int numTerms)
IV
s from a byte[].key
- The byte[].offset
- The offset into the byte[] key.numTerms
- The number of terms to decode.IV
s.public static IV[] decodeAll(byte[] key)
IV
s from a byte[].key
- The byte[].IV
s.public static IV[] decodeAll(byte[] key, int off, int len)
IV
s from a slice of a byte[].public static IV decodeFromOffset(byte[] key, int offset)
IV
.key
- The unsigned byte[] key.offset
- The offset.IV
decoded from that offset.public static IV decodeFromOffset(byte[] key, int offset, boolean nullIsNullRef)
IV
.key
- The unsigned byte[] key.offset
- The offset.nullIsNullRef
- When true
a termId:=0L
IV
is
decoded as a null
reference. Otherwise it is
decoded using TermId.mockIV(VTE)
.IV
decoded from that offset.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.