org.openrdf.sail.rdbms.schema
Class ValueTable

java.lang.Object
  extended by org.openrdf.sail.rdbms.schema.ValueTable
Direct Known Subclasses:
MySqlValueTable, PgSqlValueTable

public class ValueTable
extends Object

Manages the rows in a value table. These tables have two columns: an internal id column and a value column.

Author:
James Leigh

Field Summary
static int BATCH_SIZE
           
static long NIL_ID
           
 
Constructor Summary
ValueTable()
           
 
Method Summary
 void close()
           
protected  void createTable(RdbmsTable table)
           
protected  void createTemporaryTable(RdbmsTable table)
           
 boolean expunge(String condition)
           
 int getBatchSize()
           
 int getIdType()
           
protected  RdbmsTable getInsertTable()
           
 int getLength()
           
 String getName()
           
 RdbmsTable getRdbmsTable()
           
 int getSqlType()
           
 RdbmsTable getTemporaryTable()
           
 ValueBatch getValueBatch()
           
 void initBatch(ValueBatch batch)
           
 void initialize()
           
 void insert(Number id, Number value)
           
 void insert(Number id, String value)
           
 boolean isExpired(ValueBatch batch)
           
 boolean isIndexingValues()
           
 List<Long> maxIds(int shift, int mod)
           
 ValueBatch newValueBatch()
           
 void optimize()
           
protected  PreparedStatement prepareInsert(String sql)
           
protected  PreparedStatement prepareInsertSelect(String sql)
           
 void queue(ValueBatch batch)
           
 void setIdType(int sqlType)
           
 void setIndexingValues(boolean indexingValues)
           
 void setLength(int length)
           
 void setQueue(BlockingQueue<Batch> queue)
           
 void setRdbmsTable(RdbmsTable table)
           
 void setSqlType(int sqlType)
           
 void setTemporaryTable(RdbmsTable temporary)
           
 long size()
           
 String sql(int type, int length)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BATCH_SIZE

public static int BATCH_SIZE

NIL_ID

public static final long NIL_ID
See Also:
Constant Field Values
Constructor Detail

ValueTable

public ValueTable()
Method Detail

setQueue

public void setQueue(BlockingQueue<Batch> queue)

isIndexingValues

public boolean isIndexingValues()

setIndexingValues

public void setIndexingValues(boolean indexingValues)

getLength

public int getLength()

setLength

public void setLength(int length)

getSqlType

public int getSqlType()

setSqlType

public void setSqlType(int sqlType)

getIdType

public int getIdType()

setIdType

public void setIdType(int sqlType)

getRdbmsTable

public RdbmsTable getRdbmsTable()

setRdbmsTable

public void setRdbmsTable(RdbmsTable table)

getTemporaryTable

public RdbmsTable getTemporaryTable()

setTemporaryTable

public void setTemporaryTable(RdbmsTable temporary)

getName

public String getName()

size

public long size()

getBatchSize

public int getBatchSize()

initialize

public void initialize()
                throws SQLException
Throws:
SQLException

close

public void close()
           throws SQLException
Throws:
SQLException

insert

public void insert(Number id,
                   String value)
            throws SQLException,
                   InterruptedException
Throws:
SQLException
InterruptedException

insert

public void insert(Number id,
                   Number value)
            throws SQLException,
                   InterruptedException
Throws:
SQLException
InterruptedException

getValueBatch

public ValueBatch getValueBatch()

isExpired

public boolean isExpired(ValueBatch batch)

newValueBatch

public ValueBatch newValueBatch()

initBatch

public void initBatch(ValueBatch batch)
               throws SQLException
Throws:
SQLException

queue

public void queue(ValueBatch batch)
           throws SQLException,
                  InterruptedException
Throws:
SQLException
InterruptedException

optimize

public void optimize()
              throws SQLException
Throws:
SQLException

expunge

public boolean expunge(String condition)
                throws SQLException
Throws:
SQLException

maxIds

public List<Long> maxIds(int shift,
                         int mod)
                  throws SQLException
Throws:
SQLException

sql

public String sql(int type,
                  int length)

toString

public String toString()
Overrides:
toString in class Object

getInsertTable

protected RdbmsTable getInsertTable()

prepareInsert

protected PreparedStatement prepareInsert(String sql)
                                   throws SQLException
Throws:
SQLException

prepareInsertSelect

protected PreparedStatement prepareInsertSelect(String sql)
                                         throws SQLException
Throws:
SQLException

createTable

protected void createTable(RdbmsTable table)
                    throws SQLException
Throws:
SQLException

createTemporaryTable

protected void createTemporaryTable(RdbmsTable table)
                             throws SQLException
Throws:
SQLException


Copyright © 2001-2009 Aduna. All Rights Reserved.