public class ParallelProcessableCollection<RecordType> extends ProcessableCollection<RecordType>
Processableelements| Constructor and Description | 
|---|
ParallelProcessableCollection()  | 
ParallelProcessableCollection(Collection<RecordType> elements)  | 
ParallelProcessableCollection(Processable<RecordType> elements)  | 
| Modifier and Type | Method and Description | 
|---|---|
<KeyType,OutputRecordType,ResultType> | 
aggregate(RecordKeyValueMapper<KeyType,RecordType,OutputRecordType> groupBy,
         DataAggregator<KeyType,OutputRecordType,ResultType> aggregator)
Groups records based on the given groupBy mapper and then aggregates the groups using the aggregator. 
 | 
<OutputRecordType> | 
createProcessable(OutputRecordType dummyForTypeInference)
Creates a new  
Processable for the type given as parameter. | 
<OutputRecordType> | 
createProcessableFromCollection(Collection<OutputRecordType> data)
Creates a new  
Processable with the provided elements as content | 
void | 
foreach(Action<RecordType> action)
Iterates over the processable and executes the provided action for each element. 
 | 
void | 
foreach(DataIterator<RecordType> iterator)
Iterates over the given dataset without producing a result 
 | 
<KeyType,OutputRecordType> | 
group(RecordKeyValueMapper<KeyType,RecordType,OutputRecordType> groupBy)
Groups records based on the given groupBy mapper. 
 | 
protected <KeyType,ElementType> | 
hashRecords(Processable<ElementType> dataset,
           Function<KeyType,ElementType> hash)
Applies the hash function to all records 
 | 
<KeyType,RecordType2> | 
join(Processable<RecordType2> dataset2,
    Function<KeyType,RecordType> joinKeyGenerator1,
    Function<KeyType,RecordType2> joinKeyGenerator2)
Joins two processables using the provided joinKeyGenerators (inner join). 
 | 
<OutputRecordType> | 
map(RecordMapper<RecordType,OutputRecordType> transformation)
Iterates over all elements and produces a result 
 | 
Collection<Collection<RecordType>> | 
partitionRecords()  | 
<KeyType> Processable<Pair<RecordType,RecordType>> | 
symmetricJoin(Function<KeyType,RecordType> joinKeyGenerator,
             ProcessableCollector<Pair<RecordType,RecordType>> collector)
Joins the data to itself via the provided joinKeyGenerator (inner join). 
 | 
public ParallelProcessableCollection()
public ParallelProcessableCollection(Collection<RecordType> elements)
public ParallelProcessableCollection(Processable<RecordType> elements)
public <OutputRecordType> Processable<OutputRecordType> createProcessable(OutputRecordType dummyForTypeInference)
ProcessableProcessable for the type given as parameter.createProcessable in interface Processable<RecordType>createProcessable in class ProcessableCollection<RecordType>dummyForTypeInference - a dummy variable that is used to infer the type parameterProcessablepublic <OutputRecordType> Processable<OutputRecordType> createProcessableFromCollection(Collection<OutputRecordType> data)
ProcessableProcessable with the provided elements as contentcreateProcessableFromCollection in interface Processable<RecordType>createProcessableFromCollection in class ProcessableCollection<RecordType>data - the data from which the new processable should be createdProcessablepublic void foreach(DataIterator<RecordType> iterator)
Processableforeach in interface Processable<RecordType>foreach in class ProcessableCollection<RecordType>iterator - the iterator that should be executedpublic void foreach(Action<RecordType> action)
Processableforeach in interface Processable<RecordType>foreach in class ProcessableCollection<RecordType>action - the action that should be executedpublic Collection<Collection<RecordType>> partitionRecords()
public <OutputRecordType> Processable<OutputRecordType> map(RecordMapper<RecordType,OutputRecordType> transformation)
Processablemap in interface Processable<RecordType>map in class ProcessableCollection<RecordType>transformation - the transformation that should be appliedProcessable with the result of the operationpublic <KeyType,OutputRecordType> Processable<Group<KeyType,OutputRecordType>> group(RecordKeyValueMapper<KeyType,RecordType,OutputRecordType> groupBy)
Processablegroup in interface Processable<RecordType>group in class ProcessableCollection<RecordType>Processable with the result of the operationpublic <KeyType,OutputRecordType,ResultType> Processable<Pair<KeyType,ResultType>> aggregate(RecordKeyValueMapper<KeyType,RecordType,OutputRecordType> groupBy, DataAggregator<KeyType,OutputRecordType,ResultType> aggregator)
Processableaggregate in interface Processable<RecordType>aggregate in class ProcessableCollection<RecordType>Processable with the result of the operationprotected <KeyType,ElementType> Map<KeyType,List<ElementType>> hashRecords(Processable<ElementType> dataset, Function<KeyType,ElementType> hash)
ProcessableCollectionhashRecords in class ProcessableCollection<RecordType>public <KeyType,RecordType2> Processable<Pair<RecordType,RecordType2>> join(Processable<RecordType2> dataset2, Function<KeyType,RecordType> joinKeyGenerator1, Function<KeyType,RecordType2> joinKeyGenerator2)
Processablejoin in interface Processable<RecordType>join in class ProcessableCollection<RecordType>Processable with the result of the operationpublic <KeyType> Processable<Pair<RecordType,RecordType>> symmetricJoin(Function<KeyType,RecordType> joinKeyGenerator, ProcessableCollector<Pair<RecordType,RecordType>> collector)
ProcessablesymmetricJoin in interface Processable<RecordType>symmetricJoin in class ProcessableCollection<RecordType>joinKeyGenerator - a function that returns the join key for each elementProcessable with the result of the operationCopyright © 2018. All rights reserved.