java.lang.Object
org.apache.jena.tdb1.store.tupletable.TupleTable
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync
public class TupleTable
extends Object
implements org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
A TupleTable is a set of TupleIndexes. The first TupleIndex is the "primary" index
and must exist
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanInsert a tuple - return true if it was really added, false if it was a duplicatevoidclear()final voidclose()booleanDelete a tuple - return true if it was deleted, false if it didn't existFind all matching tuples - a slot of NodeId.NodeIdAny (or null) means match anygetIndex(int i) Get i'th indexGet all indexes - for code that manipulates internal structures directly - use with careintGet the width of tuples in indexes in this tablebooleanisEmpty()intNumber of indexes on this tuple tablevoidsetTupleIndex(int i, TupleIndex index) Set index - for code that manipulates internal structures directly - use with carelongsize()voidsync()
-
Constructor Details
-
TupleTable
-
-
Method Details
-
add
Insert a tuple - return true if it was really added, false if it was a duplicate -
delete
Delete a tuple - return true if it was deleted, false if it didn't exist -
find
public Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> find(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern) Find all matching tuples - a slot of NodeId.NodeIdAny (or null) means match any -
close
public final void close()- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
sync
public void sync()- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
isEmpty
public boolean isEmpty() -
clear
public void clear() -
size
public long size() -
getIndex
Get i'th index -
getIndexes
Get all indexes - for code that manipulates internal structures directly - use with care -
getTupleLen
public int getTupleLen()Get the width of tuples in indexes in this table -
setTupleIndex
Set index - for code that manipulates internal structures directly - use with care -
numIndexes
public int numIndexes()Number of indexes on this tuple table
-