Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
Remove internal method with incorrect implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieumorel committed Oct 26, 2012
1 parent a7f86ac commit 6dd0ed0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java
Expand Up @@ -46,7 +46,6 @@ public class Stream<T extends Event> implements Runnable, Streamable {

final static private String DEFAULT_SEPARATOR = "^";
final static private int CAPACITY = 1000;
private static int idCounter = 0;
private String name;
protected Key<T> key;
private ProcessingElement[] targetPEs;
Expand Down Expand Up @@ -139,27 +138,15 @@ public Stream<T> setKey(String keyName) {
}

/**
* Send events from this stream to a PE.
*
* @param pe
* a target PE.
*
* @return the stream object
*/
public Stream<T> setPE(ProcessingElement pe) {
app.addStream(this);
return this;
}

/**
* Send events from this stream to various PEs.
* Send events from this stream to one or more PEs.
*
* @param pes
* a target PE array.
* one or more target prototypes
*
*
* @return the stream object
*/
public Stream<T> setPEs(ProcessingElement[] pes) {
public Stream<T> setPEs(ProcessingElement... pes) {
this.targetPEs = pes;
return this;
}
Expand Down Expand Up @@ -320,7 +307,7 @@ public void run() {
}
}

public Stream<T> register() {
Stream<T> register() {
app.addStream(this);
return this;
}
Expand Down
Expand Up @@ -123,7 +123,7 @@ App buildApp() {
for (StreamBuilder<? extends Event> sb : streamBuilders) {
for (String peName : sb.pes) {
ProcessingElement pe = getPE(peName);
sb.stream.setPE(pe);
sb.stream.setPEs(pe);
}
}

Expand Down

0 comments on commit 6dd0ed0

Please sign in to comment.