/** * Thread-local object for constructing keys for the lexicon. */ public LexiconKeyBuilder getLexiconKeyBuilder() { /* * FIXME We should save off a reference to this to reduce heap churn * and then use that reference in this class. */ return new LexiconKeyBuilder(getKeyBuilder()); }
/** * Return the unsigned byte[] key for an RDF {@link Value}. * * @param obj * The RDF {@link Value}. */ @Override public byte[] serializeKey(Object obj) { return getLexiconKeyBuilder().value2Key((Value)obj); }
/** * Return a {@link LexiconKeyBuilder} that is setup with collation strength * PRIMARY. * * @see <a href="http://trac.blazegraph.com/ticket/974" > * Name2Addr.indexNameScan(prefix) uses scan + filter </a> */ public LexiconKeyBuilder getLexiconPrimaryKeyBuilder() { /* * FIXME We should save off a reference to this to reduce heap churn * and then use that reference in this class. */ return new LexiconKeyBuilder(getPrimaryKeyBuilder()); }
/** * Return the {@link IndexMetadata} for the TERM2ID index. * * @param name * The name of the index. * * @return The {@link IndexMetadata}. */ protected IndexMetadata getTerm2IdIndexMetadata(final String name) { final IndexMetadata metadata = newIndexMetadata(name); metadata.setTupleSerializer(new Term2IdTupleSerializer(getProperties())); return metadata; }
super(keyBuilderFactory, getDefaultLeafKeysCoder(),
/** * Return the {@link IndexMetadata} for the TERM2ID index. * * @param name * The name of the index. * * @return The {@link IndexMetadata}. */ protected IndexMetadata getTerm2IdIndexMetadata(final String name) { final IndexMetadata metadata = newIndexMetadata(name); metadata.setTupleSerializer(new Term2IdTupleSerializer(getProperties())); return metadata; }
super(keyBuilderFactory, getDefaultLeafKeysCoder(),
/** * Return the unsigned byte[] key for an RDF {@link Value}. * * @param obj * The RDF {@link Value}. */ @Override public byte[] serializeKey(Object obj) { return getLexiconKeyBuilder().value2Key((Value)obj); }
/** * Thread-local object for constructing keys for the lexicon. */ public LexiconKeyBuilder getLexiconKeyBuilder() { /* * FIXME We should save off a reference to this to reduce heap churn * and then use that reference in this class. */ return new LexiconKeyBuilder(getKeyBuilder()); }
/** * Return a {@link LexiconKeyBuilder} that is setup with collation strength * PRIMARY. * * @see <a href="http://trac.blazegraph.com/ticket/974" > * Name2Addr.indexNameScan(prefix) uses scan + filter </a> */ public LexiconKeyBuilder getLexiconPrimaryKeyBuilder() { /* * FIXME We should save off a reference to this to reduce heap churn * and then use that reference in this class. */ return new LexiconKeyBuilder(getPrimaryKeyBuilder()); }
: tupleSerTerm2Id.getLexiconKeyBuilder();
/** * Return the byte[] value, which is a term identifier written as a packed * long integer. * * @param obj * A term identifier expressed as a {@link TermId}. */ @Override public byte[] serializeVal(final Object obj) { final IV<?,?> iv = (IV<?,?>) obj; /* * Note: reusing the same KeyBuilder as the keys, but that is Ok since * the IV encoding does not rely on the Unicode properties and the * KeyBuilder is a thread-local instance so there is no contention for * it. */ final byte[] key = iv.encode(getKeyBuilder()).getKey(); return key; }
b = generateSortKeys(tupleSer.getLexiconKeyBuilder(), terms, numTerms);
/** * Return the byte[] value, which is a term identifier written as a packed * long integer. * * @param obj * A term identifier expressed as a {@link TermId}. */ @Override public byte[] serializeVal(final Object obj) { final IV<?,?> iv = (IV<?,?>) obj; /* * Note: reusing the same KeyBuilder as the keys, but that is Ok since * the IV encoding does not rely on the Unicode properties and the * KeyBuilder is a thread-local instance so there is no contention for * it. */ final byte[] key = iv.encode(getKeyBuilder()).getKey(); return key; }
: tupleSerTerm2Id.getLexiconKeyBuilder();
b = generateSortKeys(tupleSer.getLexiconKeyBuilder(), terms, numTerms);
key = tupleSer.getLexiconKeyBuilder().value2Key(value);
key = tupleSer.getLexiconKeyBuilder().value2Key(value);