org.openstreetmap.osmosis.core.apidb.v0_6
Class ApidbTestReader

java.lang.Object
  extended by org.openstreetmap.osmosis.core.apidb.v0_6.ApidbTestReader
All Implemented Interfaces:
java.lang.Runnable, RunnableTask, Task

public class ApidbTestReader
extends java.lang.Object
implements RunnableTask

A change source reading from database history tables. This aims to be suitable for running at regular intervals with database overhead proportional to changeset size.

Author:
Brett Henderson

Constructor Summary
ApidbTestReader(DatabaseLoginCredentials loginCredentials, DatabasePreferences preferences, java.util.Date intervalBegin, java.util.Date intervalEnd, boolean enableSpring, boolean enableNewQuery)
          Creates a new instance.
 
Method Summary
 void run()
          Reads all data from the database and send it to the sink.
protected  void runImpl(DatabaseContext2 dbCtx)
          Runs the task implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApidbTestReader

public ApidbTestReader(DatabaseLoginCredentials loginCredentials,
                       DatabasePreferences preferences,
                       java.util.Date intervalBegin,
                       java.util.Date intervalEnd,
                       boolean enableSpring,
                       boolean enableNewQuery)
Creates a new instance.

Parameters:
loginCredentials - Contains all information required to connect to the database.
preferences - Contains preferences configuring database behaviour.
intervalBegin - Marks the beginning (inclusive) of the time interval to be checked.
intervalEnd - Marks the end (exclusive) of the time interval to be checked.
enableSpring - If true use Spring, otherwise use raw JDBC.
enableNewQuery - If true use the new query style, otherwise use the old style.
Method Detail

runImpl

protected void runImpl(DatabaseContext2 dbCtx)
Runs the task implementation. This is called by the run method within a transaction.

Parameters:
dbCtx - Used to access the database.

run

public void run()
Reads all data from the database and send it to the sink.

Specified by:
run in interface java.lang.Runnable