|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.spo.SPOKeyOrder
public class SPOKeyOrder
Represents the key order used by an index for a triple relation.
| Field Summary | |
|---|---|
static int |
_CSPO
|
static int |
_OCSP
|
static int |
_OSP
|
static int |
_PCSO
|
static int |
_POCS
|
static int |
_POS
|
static int |
_SOPC
|
static int |
_SPO
|
static int |
_SPOC
|
static SPOKeyOrder |
CSPO
|
static int |
FIRST_QUAD_INDEX
|
static int |
FIRST_TRIPLE_INDEX
|
static int |
LAST_QUAD_INDEX
|
static int |
LAST_TRIPLE_INDEX
|
static int |
MAX_INDEX_COUNT
|
static SPOKeyOrder |
OCSP
|
static SPOKeyOrder |
OSP
|
static SPOKeyOrder |
PCSO
|
static SPOKeyOrder |
POCS
|
static SPOKeyOrder |
POS
|
static SPOKeyOrder |
SOPC
|
static SPOKeyOrder |
SPO
|
static SPOKeyOrder |
SPOC
|
| Method Summary | |
|---|---|
SPO |
decodeKey(byte[] key)
Decode the key into an SPO. |
byte[] |
encodeKey(IKeyBuilder keyBuilder,
ISPO spo)
|
Comparator<ISPO> |
getComparator()
Return the comparator that places ISPOs into the natural order
for the associated index. |
byte[] |
getFromKey(IKeyBuilder keyBuilder,
IPredicate<ISPO> predicate)
Return the inclusive lower bound which would be used for a query against this IKeyOrder for the given IPredicate. |
String |
getIndexName()
The base name for the index. |
int |
getKeyArity()
Return either 3 or 4 depending on the #of components in the key for this natural key ordering. |
int |
getKeyOrder(int keyPos)
Return the index of the slot in the ISPO tuple which appears at
the specified position in the key. |
static SPOKeyOrder |
getKeyOrder(IPredicate<ISPO> predicate,
int keyArity)
Return the SPOKeyOrder for the given predicate. |
byte[] |
getToKey(IKeyBuilder keyBuilder,
IPredicate<ISPO> predicate)
Return the exclusive upper bound which would be used for a query against this IKeyOrder for the given IPredicate. |
int |
index()
The integer used to represent the SPOKeyOrder. |
boolean |
isPrimaryIndex()
Return true if this is the primary index for the relation. |
static Iterator<SPOKeyOrder> |
quadStoreKeyOrderIterator()
Return an iterator which visits the quad store indices ( SPOC,
POCS, OCSP, CSPO, PCSO, SOPC
). |
static Iterator<SPOKeyOrder> |
spocOnlyKeyOrderIterator()
Return an iterator which visits only SPOC. |
static Iterator<SPOKeyOrder> |
spoOnlyKeyOrderIterator()
Return an iterator which visits only SPO. |
String |
toString()
Return getIndexName()'s value. |
static Iterator<SPOKeyOrder> |
tripleStoreKeyOrderIterator()
Return an iterator which visits the triple store indices ( SPO,
POS, OSP). |
static SPOKeyOrder |
valueOf(int index)
Returns the singleton corresponding to the index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final transient int _SPO
public static final transient int _OSP
public static final transient int _POS
public static final transient int _SPOC
public static final transient int _POCS
public static final transient int _OCSP
public static final transient int _CSPO
public static final transient int _PCSO
public static final transient int _SOPC
public static final transient int FIRST_TRIPLE_INDEX
public static final transient int LAST_TRIPLE_INDEX
public static final transient int FIRST_QUAD_INDEX
public static final transient int LAST_QUAD_INDEX
public static final transient int MAX_INDEX_COUNT
public static final transient SPOKeyOrder SPO
public static final transient SPOKeyOrder POS
public static final transient SPOKeyOrder OSP
public static final transient SPOKeyOrder SPOC
public static final transient SPOKeyOrder POCS
public static final transient SPOKeyOrder OCSP
public static final transient SPOKeyOrder CSPO
public static final transient SPOKeyOrder PCSO
public static final transient SPOKeyOrder SOPC
| Method Detail |
|---|
public final boolean isPrimaryIndex()
true if this is the primary index for the relation.
true for SPO or SPOC. Those are
the natural orders corresponding to the primary index for a
triple store (SPO) and a quad store (SPOC) respectively.public static SPOKeyOrder valueOf(int index)
index - The index.
SPOKeyOrder having that index.
IllegalArgumentException - if the index is not valid.public final String getIndexName()
getIndexName in interface IKeyOrder<ISPO>public String toString()
getIndexName()'s value.
toString in class Objectpublic final int getKeyArity()
getKeyArity in interface IKeyOrder<ISPO>public final int getKeyOrder(int keyPos)
ISPO tuple which appears at
the specified position in the key.
getKeyOrder in interface IKeyOrder<ISPO>keyPos - The index into the key that is being generated.
ISPO.public final int index()
SPOKeyOrder. For a triple
store, this is one of the constants: _SPO, POS, or
OSP. For a quad store, this is one of the constants
_SPOC, _POCS, _OCSP, _CSPO,
_PCSO, _SOPC.
public final Comparator<ISPO> getComparator()
ISPOs into the natural order
for the associated index.
getComparator in interface IKeyOrder<ISPO>SPOComparator,
POSComparator, and OSPComparator and just use the
GeneralComparator. Will the hot spot compiler do better
with just one class handling all of those comparisons?
public final byte[] getFromKey(IKeyBuilder keyBuilder,
IPredicate<ISPO> predicate)
IKeyOrder for the given IPredicate.
IKeyOrder.
public final byte[] getToKey(IKeyBuilder keyBuilder,
IPredicate<ISPO> predicate)
IKeyOrder for the given IPredicate.
IKeyOrder.
public final byte[] encodeKey(IKeyBuilder keyBuilder,
ISPO spo)
public final SPO decodeKey(byte[] key)
SPO. The StatementEnum and the
optional SID will not be decoded, since it is carried in the B+Tree
value. However, if the SPOKeyOrder is a quad order then the
SPO.c() will be bound.
keyOrder - The natural order of the key.key - The key.
public static SPOKeyOrder getKeyOrder(IPredicate<ISPO> predicate,
int keyArity)
SPOKeyOrder for the given predicate.
predicate - The predicate.
SPOKeyOrderpublic static Iterator<SPOKeyOrder> tripleStoreKeyOrderIterator()
SPO,
POS, OSP).
public static Iterator<SPOKeyOrder> quadStoreKeyOrderIterator()
SPOC,
POCS, OCSP, CSPO, PCSO, SOPC
).
public static Iterator<SPOKeyOrder> spoOnlyKeyOrderIterator()
SPO.
public static Iterator<SPOKeyOrder> spocOnlyKeyOrderIterator()
SPOC.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||