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
    Constructor
    Description
    TupleTable(int tupleLen, TupleIndex[] indexes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> t)
    Insert a tuple - return true if it was really added, false if it was a duplicate
    void
     
    final void
     
    boolean
    delete(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> t)
    Delete a tuple - return true if it was deleted, false if it didn't exist
    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
    getIndex(int i)
    Get i'th index
    Get all indexes - for code that manipulates internal structures directly - use with care
    int
    Get the width of tuples in indexes in this table
    boolean
     
    int
    Number of indexes on this tuple table
    void
    setTupleIndex(int i, TupleIndex index)
    Set index - for code that manipulates internal structures directly - use with care
    long
     
    void
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TupleTable

      public TupleTable(int tupleLen, TupleIndex[] indexes)
  • Method Details

    • add

      public boolean add(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> t)
      Insert a tuple - return true if it was really added, false if it was a duplicate
    • delete

      public boolean delete(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> t)
      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:
      close in interface org.apache.jena.atlas.lib.Closeable
    • sync

      public void sync()
      Specified by:
      sync in interface org.apache.jena.atlas.lib.Sync
    • isEmpty

      public boolean isEmpty()
    • clear

      public void clear()
    • size

      public long size()
    • getIndex

      public TupleIndex getIndex(int i)
      Get i'th index
    • getIndexes

      public TupleIndex[] 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

      public void setTupleIndex(int i, TupleIndex index)
      Set index - for code that manipulates internal structures directly - use with care
    • numIndexes

      public int numIndexes()
      Number of indexes on this tuple table