You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/06/12 20:08:28 UTC
[05/14] git commit: STREAMS-83 | Updated twitter stream provider with
running method
STREAMS-83 | Updated twitter stream provider with running method
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/82858ebf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/82858ebf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/82858ebf
Branch: refs/heads/STREAMS-83
Commit: 82858ebfd0c4027780a92e763bb3b6e9fec950b9
Parents: 8bdb63c
Author: mfranklin <mf...@apache.org>
Authored: Thu Jun 12 11:54:16 2014 -0500
Committer: mfranklin <mf...@apache.org>
Committed: Thu Jun 12 11:54:16 2014 -0500
----------------------------------------------------------------------
.../apache/streams/twitter/provider/TwitterStreamProvider.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/82858ebf/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterStreamProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterStreamProvider.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterStreamProvider.java
index 0a81deb..f7c438c 100644
--- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterStreamProvider.java
+++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterStreamProvider.java
@@ -137,6 +137,11 @@ public class TwitterStreamProvider implements StreamsProvider, Serializable, Dat
}
@Override
+ public boolean isRunning() {
+ return !executor.isShutdown() && !executor.isTerminated();
+ }
+
+ @Override
public void prepare(Object o) {
executor = MoreExecutors.listeningDecorator(newFixedThreadPoolWithQueueSize(5, 20));