Package org.pipecraft.pipes
Interface BasePipe
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
Pipe<T>
- All Known Implementing Classes:
AsyncCallbackPipe,AsyncCollectionWriterPipe,AsyncCompoundPipe,AsyncConsumerPipe,AsyncEmptyPipe,AsyncEnqueuingSharderPipe,AsyncFilterPipe,AsyncFlexibleMapPipe,AsyncHeadPipe,AsyncMapPipe,AsyncMultiFileReaderPipe,AsyncPipe,AsyncProgressPipe,AsyncSeqGenPipe,AsyncSharderByHashPipe,AsyncSharderPipe,AsyncStorageMultiFileReaderPipe,AsyncTimeoutPipe,AsyncToSyncPipe,AsyncUnionPipe,BinFileWriterPipe,BinInputReaderPipe,CallbackPipe,CollectionReaderPipe,CollectionWriterPipe,CompoundPipe,CompoundTerminalPipe,ConcatPipe,ConsumerPipe,CountPipe,CSVMapperPipe,DedupPipe,DelegatePipe,DistributedShufflerPipe,EmptyPipe,ErrorPipe,ExactSamplerPipe,FilterBasePipe,FilterPipe,FlexibleMapPipe,GrouperPipe,HashJoinPipe,HashReductorPipe,HeadPipe,InputStreamPipe,IntermediateBinFileWriterPipe,IntermediateSharderBySeqPipe,IntermediateTxtFileWriterPipe,IteratorReaderPipe,JdbcQueryResultsPipe,ListReductorPipe,LookupJoinPipe,MapPipe,MultiFileReaderPipe,MultiSortedBasePipe,MultiTxtFileReaderPipe,OrderValidationPipe,ParallelConsumerPipe,PercentilePipe,PortionSamplerPipe,ProgressPipe,QueueReaderPipe,QueueWriterPipe,ReaderPipe,SeqGenPipe,SequenceReductorPipe,SharderByHashPipe,SharderByItemPipe,SharderBySeqPipe,SkipPipe,SortedIntersectionPipe,SortedJoinPipe,SortedMergePipe,SortedSubtractionPipe,SortedUnionPipe,SortPipe,StorageMultiFileReaderPipe,StorageMultiTxtFileReaderPipe,StorageTxtFileFetcherReaderPipe,StorageTxtFileReaderPipe,StorageTxtFileWriterPipe,SyncToAsyncPipe,TerminalPipe,TopKPipe,TxtFileReaderPipe,TxtFileWriterPipe,URLTxtReaderPipe,WriterPipe
public interface BasePipe extends Closeable
A base interface containing minimal API for sync, async and terminal pipes- Author:
- Eyal Schneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetProgress()voidstart()Performs pre-processing prior to item flow throw the pipe.
-
-
-
Method Detail
-
start
void start() throws PipeException, InterruptedExceptionPerforms pre-processing prior to item flow throw the pipe. Implementations must call the same method for all their input pipes before accessing their items. This is typically done here.- Throws:
PipeException- In case of pipe errors in this pipe or somewhere up-stream.InterruptedException- In case that the operation has been interrupted by another thread.
-
getProgress
float getProgress()
- Returns:
- The pipe flow progress, as a floating number between 0.0 and 1.0. Important implementation rules: 1) Calling this method before start() call is complete isn't allowed and has an undefined behavior. 2) Implementation should do best effort to provide an estimate of the progress this pipe has made (0.0 - 1.0) 3) When the pipe is fully consumed, getProgress() should return 1.0. 4) Results must be monotonous, i.e. results of consecutive calls may never be decreasing. 5) Thread safety: progress may be maintained by some thread/s but monitoring by other threads. Implementations must be thread safe.
-
-