You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2014/10/01 17:51:58 UTC
[32/50] [abbrv] git commit: STREAMS-176 | Added ability to override
functions that could prove useful to downstream developers
STREAMS-176 | Added ability to override functions that could prove useful to downstream developers
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/95509b08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/95509b08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/95509b08
Branch: refs/heads/REDBULL-1604
Commit: 95509b08df3cf1c4132ca131d102acd1513a6514
Parents: 35a8fbf
Author: Robert Douglas <rd...@w2odigital.com>
Authored: Tue Sep 16 13:48:17 2014 -0500
Committer: Robert Douglas <rd...@w2odigital.com>
Committed: Tue Sep 16 13:48:17 2014 -0500
----------------------------------------------------------------------
.../streams/twitter/provider/TwitterTimelineProvider.java | 10 ++++------
.../twitter/provider/TwitterTimelineProviderTask.java | 6 +++---
2 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95509b08/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
index ae755c2..e29790e 100644
--- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
+++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
@@ -19,7 +19,6 @@
package org.apache.streams.twitter.provider;
import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import org.apache.streams.core.DatumStatusCounter;
@@ -116,11 +115,11 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
executor.shutdown();
}
- protected boolean shouldContinuePulling(List<Status> statuses) {
+ public boolean shouldContinuePulling(List<Status> statuses) {
return (statuses != null) && (statuses.size() > 0);
}
- private void submitTimelineThreads(Long[] ids) {
+ protected void submitTimelineThreads(Long[] ids) {
Twitter client = getTwitterClient();
for(int i = 0; i < ids.length; i++) {
@@ -267,8 +266,7 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
}
}
- protected Twitter getTwitterClient()
- {
+ public Twitter getTwitterClient() {
String baseUrl = "https://api.twitter.com:443/1.1/";
ConfigurationBuilder builder = new ConfigurationBuilder()
@@ -291,7 +289,7 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
shutdownAndAwaitTermination(executor);
}
- protected void addDatum(StreamsDatum datum) {
+ public void addDatum(StreamsDatum datum) {
try {
lock.readLock().lock();
ComponentUtils.offerUntilSuccess(datum, providerQueue);
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95509b08/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProviderTask.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProviderTask.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProviderTask.java
index 96fbb42..c581516 100644
--- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProviderTask.java
+++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProviderTask.java
@@ -33,9 +33,9 @@ public class TwitterTimelineProviderTask implements Runnable {
private final static Logger LOGGER = LoggerFactory.getLogger(TwitterTimelineProviderTask.class);
- private TwitterTimelineProvider provider;
- private Twitter client;
- private Long id;
+ protected TwitterTimelineProvider provider;
+ protected Twitter client;
+ protected Long id;
public TwitterTimelineProviderTask(TwitterTimelineProvider provider, Twitter twitter, Long id) {
this.provider = provider;