Skip to content
Permalink
Browse files

Code cleanup

  • Loading branch information...
Ghost-Programmer committed Apr 6, 2019
1 parent 707f5c8 commit 60779cc4047d60a57d3285fe210614086b78d732
@@ -8,8 +8,7 @@
*
* @author jmiller
*
* @param <R>
* Type of collection to be returned.
* @param <R> Type of collection to be returned.
*/
public interface CollectorInterface<S, R> extends PipeInterface<S, S> {
/**
@@ -9,20 +9,17 @@
/**
* /** Pipe used for collecting the data coming down the pipe. Data is passed on
* after it is is added to the collection
*
*
* @author jmiller
*
* @param <S>
* Data Source Type
* @param <A>
* Accumulator
* @param <R>
* Collection Type
* @param <S> Data Source Type
* @param <A> Accumulator
* @param <R> Collection Type
*/
public class CollectorPipe<S, A, R> implements CollectorInterface<S, R> {

private Collector<S, A, R> collector;
private A supplier;
private final Collector<S, A, R> collector;
private final A supplier;

public CollectorPipe(Collector<S, A, R> collector) {
this.collector = collector;
@@ -13,18 +13,12 @@
/**
* Process Exceptions to determine if processing should continue to occur
*
* @param throwable
* Throwable caught.
* @param pipe
* PipeInterface that received the exception
* @param data
* Data passed to the pipe.
* @param futures
* Futures passed to the pipe.
* @param pipelineName
* Name of the pipeline.
* @param isParallel
* Indicates if the processing is occurring in Parallel
* @param throwable Throwable caught.
* @param pipe PipeInterface that received the exception
* @param data Data passed to the pipe.
* @param futures Futures passed to the pipe.
* @param pipelineName Name of the pipeline.
* @param isParallel Indicates if the processing is occurring in Parallel
* @return Boolean true indicates attempt to process, false abort.
*/
public abstract boolean process(Throwable throwable, PipeInterface<?, ?> pipe, final Object data,
@@ -14,8 +14,7 @@
* Future representing the final data for a pipeline.
*
* @author jmiller
* @param <V>
* Type of final data
* @param <V> Type of final data
*
*/
public class PipeFuture<V> implements Future<V> {
@@ -45,8 +44,7 @@
/**
* Constructor that takes the identifier for the future.
*
* @param identifier
* String indicating the pipeline this ia future too.
* @param identifier String indicating the pipeline this ia future too.
*/
public PipeFuture(String identifier, UUID pipelineId) {
this.syncObject = new Object();
@@ -96,16 +94,14 @@ public boolean isDone() {
}

/**
* @param done
* the done to set
* @param done the done to set
*/
public synchronized void setDone(boolean done) {
this.done.set(done);
}

/**
* @param futureObject
* the futureObject to set
* @param futureObject the futureObject to set
*/
public synchronized void setFutureObject(V futureObject) {
this.futureObject = futureObject;
@@ -21,16 +21,12 @@
/**
* Method to process the object pushed to the pipe.
*
* @param data
* Object being pushed to the pipe
* @param futures
* list of futures associated with this data as possible terminate
* points.
* @param String
* containing the name of this pipeline.
* @param data Object being pushed to the pipe
* @param futures list of futures associated with this data as possible
* terminate points.
* @param String containing the name of this pipeline.
* @return Object after processing has occurred.
* @throws Throwable
* TODO
* @throws Throwable TODO
*/
public abstract T process(final S data, List<PipeFuture<?>> futures, String pipelineName, boolean isParallel)
throws Throwable;
Oops, something went wrong.

0 comments on commit 60779cc

Please sign in to comment.
You can’t perform that action at this time.