org.gcube.datatransformation.datatransformationlibrary
Class DataSourceMerger

java.lang.Object
  extended by java.lang.Thread
      extended by org.gcube.datatransformation.datatransformationlibrary.DataSourceMerger
All Implemented Interfaces:
java.lang.Runnable

public class DataSourceMerger
extends java.lang.Thread

Author:
Dimitris Katris, NKUA This class is responsible to get the DataElements of many DataSources and store them into one DataSink.

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DataSourceMerger()
           
 
Method Summary
 boolean add(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source)
          Adds a DataSource in the DataSourceMerger.
 void finishedAddingSources()
          This method have to been invoked in order to denote that no more DataSources will be appended in the DataSourceMerger.
 void run()
           
 void setSink(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink)
          Sets the common DataSink.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSourceMerger

public DataSourceMerger()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

finishedAddingSources

public void finishedAddingSources()
This method have to been invoked in order to denote that no more DataSources will be appended in the DataSourceMerger.


add

public boolean add(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source)
Adds a DataSource in the DataSourceMerger.

Parameters:
source - The DataSource which will be added.
Returns:
True if the DataSource appended in the List successfully.

setSink

public void setSink(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink)
Sets the common DataSink.

Parameters:
sink - The common DataSink.