org.openstreetmap.osmosis.core.merge.v0_6
Class ChangeAppender

java.lang.Object
  extended by org.openstreetmap.osmosis.core.merge.v0_6.ChangeAppender
All Implemented Interfaces:
java.lang.Runnable, Task, ChangeSource, MultiChangeSink, MultiChangeSinkRunnableChangeSource, RunnableChangeSource

public class ChangeAppender
extends java.lang.Object
implements MultiChangeSinkRunnableChangeSource

Combines multiple change sources into a single data set. It is done by writing the contents of each of the input sources to the sink in order.

Author:
Brett Henderson

Constructor Summary
ChangeAppender(int sourceCount)
          Creates a new instance.
 
Method Summary
 ChangeSink getChangeSink(int instance)
          Obtains one of the change sinks exposed by the task.
 int getChangeSinkCount()
          Returns the number of change sinks provided by this task.
 void run()
          
 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

ChangeAppender

public ChangeAppender(int sourceCount)
Creates a new instance.

Parameters:
sourceCount - The number of sources to be appended.
Method Detail

getChangeSink

public ChangeSink getChangeSink(int instance)
Obtains one of the change sinks exposed by the task.

Specified by:
getChangeSink in interface MultiChangeSink
Parameters:
instance - The index of the change sink to be returned.
Returns:
The change sink.

getChangeSinkCount

public int getChangeSinkCount()
Returns the number of change sinks provided by this task.

Specified by:
getChangeSinkCount in interface MultiChangeSink
Returns:
The number of change sinks.

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()

Specified by:
run in interface java.lang.Runnable