org.gcube.contentmanagement.timeseriesservice.impl.thread
Class InsertThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.gcube.contentmanagement.timeseriesservice.impl.thread.InsertThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
InsertDenomalizedT, InsertNormalizedT

public abstract class InsertThread
extends Thread

Author:
lucio

Nested Class Summary
 class InsertThread.LineProcessor
           
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  int columnsNumber
           
protected  char delimiter
           
protected  String encoding
           
protected  boolean[] fieldsMask
           
protected  boolean hasHeader
           
protected  ImporterItem importer
           
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
protected  String rslocator
           
protected  org.gcube.common.dbinterface.pool.DBSession session
           
protected  String tableName
           
protected  int totalEntries
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InsertThread(String rslocator, String tableName, boolean[] fieldsMask, boolean hasHeader, char delimiter, String encoding, ImporterItem importer)
           
 
Method Summary
protected  org.gcube.common.dbinterface.tables.SimpleTable createTable(List<org.gcube.common.dbinterface.ColumnDefinition> tableDefintion)
           
abstract  void execute(net.sf.csv4j.CSVReaderProcessor processor, File fileStream)
           
protected  ImportResource getResource()
           
protected  File readStream()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected org.gcube.common.core.utils.logging.GCUBELog logger

session

protected org.gcube.common.dbinterface.pool.DBSession session

rslocator

protected String rslocator

tableName

protected String tableName

fieldsMask

protected boolean[] fieldsMask

totalEntries

protected int totalEntries

columnsNumber

protected int columnsNumber

hasHeader

protected boolean hasHeader

delimiter

protected char delimiter

encoding

protected String encoding

importer

protected ImporterItem importer
Constructor Detail

InsertThread

public InsertThread(String rslocator,
                    String tableName,
                    boolean[] fieldsMask,
                    boolean hasHeader,
                    char delimiter,
                    String encoding,
                    ImporterItem importer)
Method Detail

getResource

protected ImportResource getResource()
                              throws org.globus.wsrf.ResourceException
Throws:
org.globus.wsrf.ResourceException

createTable

protected org.gcube.common.dbinterface.tables.SimpleTable createTable(List<org.gcube.common.dbinterface.ColumnDefinition> tableDefintion)
                                                               throws Exception
Parameters:
tableDefintion -
Returns:
Throws:
Exception

readStream

protected File readStream()
                   throws Exception
Returns:
Throws:
Exception

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

execute

public abstract void execute(net.sf.csv4j.CSVReaderProcessor processor,
                             File fileStream)
                      throws Exception
Parameters:
processor -
reader -
Throws:
Exception


Copyright © 2012. All Rights Reserved.