org.openstreetmap.osmosis.core.change.v0_6
Class ChangeDeriver

java.lang.Object
  extended by org.openstreetmap.osmosis.core.change.v0_6.ChangeDeriver
All Implemented Interfaces:
java.lang.Runnable, Task, ChangeSource, MultiSink, MultiSinkRunnableChangeSource, RunnableChangeSource

public class ChangeDeriver
extends java.lang.Object
implements MultiSinkRunnableChangeSource

Compares two different data sources and produces a set of differences.

Author:
Brett Henderson

Constructor Summary
ChangeDeriver(int inputBufferCapacity)
          Creates a new instance.
 
Method Summary
 Sink getSink(int instance)
          Obtains one of the sinks exposed by the task.
 int getSinkCount()
          This implementation always returns 2.
 void run()
          Processes the input sources and sends the changes to the change sink.
 void setChangeSink(ChangeSink changeSink)
          Sets the change sink to send data to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeDeriver

public ChangeDeriver(int inputBufferCapacity)
Creates a new instance.

Parameters:
inputBufferCapacity - The size of the buffers to use for input sources.
Method Detail

getSink

public Sink getSink(int instance)
Obtains one of the sinks exposed by the task.

Specified by:
getSink in interface MultiSink
Parameters:
instance - The index of the sink to be returned.
Returns:
The sink.

getSinkCount

public int getSinkCount()
This implementation always returns 2.

Specified by:
getSinkCount in interface MultiSink
Returns:
2

setChangeSink

public void setChangeSink(ChangeSink changeSink)
Sets the change sink to send data to.

Specified by:
setChangeSink in interface ChangeSource
Parameters:
changeSink - The sink for receiving all produced data.

run

public void run()
Processes the input sources and sends the changes to the change sink.

Specified by:
run in interface java.lang.Runnable