com.senseidb.gateway.file
Class LinedFileDataProvider<D>

java.lang.Object
  extended by proj.zoie.impl.indexing.StreamDataProvider<D>
      extended by com.senseidb.gateway.file.LinedFileDataProvider<D>
All Implemented Interfaces:
proj.zoie.api.DataProvider<D>, proj.zoie.mbean.DataProviderAdminMBean
Direct Known Subclasses:
LinedJsonFileDataProvider

public abstract class LinedFileDataProvider<D>
extends proj.zoie.impl.indexing.StreamDataProvider<D>


Field Summary
 
Fields inherited from class proj.zoie.impl.indexing.StreamDataProvider
_versionComparator
 
Constructor Summary
LinedFileDataProvider(Comparator<String> versionComparator, File file, long startingOffset)
           
 
Method Summary
protected abstract  D convertLine(String line)
           
 proj.zoie.api.DataConsumer.DataEvent<D> next()
           
 void reset()
           
 void setStartingOffset(String version)
           
 void start()
           
 void stop()
           
 
Methods inherited from class proj.zoie.impl.indexing.StreamDataProvider
getBatchSize, getDataConsumer, getEventCount, getEventsPerMinute, getMaxEventsPerMinute, getRetryTime, getStatus, pause, resume, setBatchSize, setDataConsumer, setMaxEventsPerMinute, setRetryTime, syncWithVersion, syncWthVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinedFileDataProvider

public LinedFileDataProvider(Comparator<String> versionComparator,
                             File file,
                             long startingOffset)
Method Detail

convertLine

protected abstract D convertLine(String line)
                          throws IOException
Throws:
IOException

next

public proj.zoie.api.DataConsumer.DataEvent<D> next()
Specified by:
next in class proj.zoie.impl.indexing.StreamDataProvider<D>

setStartingOffset

public void setStartingOffset(String version)
Specified by:
setStartingOffset in class proj.zoie.impl.indexing.StreamDataProvider<D>

reset

public void reset()
Specified by:
reset in class proj.zoie.impl.indexing.StreamDataProvider<D>

start

public void start()
Specified by:
start in interface proj.zoie.mbean.DataProviderAdminMBean
Overrides:
start in class proj.zoie.impl.indexing.StreamDataProvider<D>

stop

public void stop()
Specified by:
stop in interface proj.zoie.mbean.DataProviderAdminMBean
Overrides:
stop in class proj.zoie.impl.indexing.StreamDataProvider<D>


Copyright © 2010-2012. All Rights Reserved.