[ 
https://issues.apache.org/jira/browse/EDGENT-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15651225#comment-15651225
 ] 

Dale LaBossiere commented on EDGENT-308:
----------------------------------------

Perhaps we can turn this jira into a feature request once the requirements are 
clearer.

What is it that you want to happen every <poll> units?  
- Return ALL of the current content of a file as a List<String>?  
- Return just NEW file content since the last poll as a List<String> (an empty 
list if nothing new since the last poll)?  
- Or something else?

The pool frequency needs to be dynamically changeable.
Just to clarify, the pool frequency of CommandStreams.poll(...) can be changed 
dynamically in the manner documented by Topology.poll().

Such a textFileReader-variant instance only operates on a single file?  Must 
the file it operates on need to be changeable - i.e., it operates on one file 
until told to switch to a different file?

CommandStreams won't work for your case because simply because it's not 
platform independent - e.g., *nix vs Windows?

> Is it possible to use poll() with FileStreams together
> ------------------------------------------------------
>
>                 Key: EDGENT-308
>                 URL: https://issues.apache.org/jira/browse/EDGENT-308
>             Project: Edgent
>          Issue Type: New Feature
>          Components: Connectors
>            Reporter: Rui Shen
>
> My requirement is to load data from a file and polling with a specific 
> frequency (say every 1 second). 
> I found Topology.poll() can do this, but it requires a Supplier parameter and 
> the get method is called periodically. With this way, I have to read the file 
> content myself and create a Iterable instance, then a Supplier. 
> I want to use FileStreams.textFileReader() to handle the file reading. The 
> problem is how to use it with Topology.poll() together? I could not find a 
> way to do this. 
> Is there any way to do this? Or connectors does not support "polling" at all? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to