gr.uoa.di.madgik.searchlibrary.operatorlibrary.transform
Class ScriptWorker<T extends gr.uoa.di.madgik.grs.record.Record>
java.lang.Object
java.lang.Thread
gr.uoa.di.madgik.searchlibrary.operatorlibrary.transform.ScriptWorker<T>
- All Implemented Interfaces:
- Runnable
public class ScriptWorker<T extends gr.uoa.di.madgik.grs.record.Record>
- extends Thread
|
Method Summary |
protected URI |
getLocator()
|
void |
run()
Performs the transform operation |
| 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 |
ScriptWorker
public ScriptWorker(gr.uoa.di.madgik.grs.reader.IRecordReader<T> reader,
String script,
String schema,
StatsContainer stats,
long timeout,
TimeUnit timeUnit)
throws Exception
- Parameters:
reader - The IRecordReader to consume records fromwriter - The IRecordWriter which will be used to write the
outputpayloadFieldName - The name of the Field containing the payload on which
the transformation will be appliedscript - The script to apply on each record fieldschema - schema that describes new result setstats - Statisticstimeout - The timeout which will be used both by the reader and the
writertimeUnit - The unit of the timeout which will be used
- Throws:
Exception - if script is not initialised right
run
public void run()
- Performs the transform operation
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
getLocator
protected URI getLocator()
throws InterruptedException,
gr.uoa.di.madgik.grs.writer.GRS2WriterException
- Throws:
InterruptedException
gr.uoa.di.madgik.grs.writer.GRS2WriterException
Copyright © 2013. All Rights Reserved.