private void join(TimeEvent tuple,boolean isLeft){
  ArrayList<TimeEvent> value;
  JoinStore store=isLeft ? rightStore.getStore() : leftStore.getStore();
  if (tuple != null) {
    value=(ArrayList<TimeEvent>)store.getValidTuples(tuple);
  }
 else {
    value=(ArrayList<TimeEvent>)store.getUnMatchedTuples();
  }
  if (value != null) {
    List<T> result=new ArrayList<>();
    for (    TimeEvent joinedValue : value) {
      T output=createOutputTuple();
      Object tupleValue=null;
      if (tuple != null) {
        tupleValue=tuple.getValue();
      }
      copyValue(output,tupleValue,isLeft);
      copyValue(output,joinedValue.getValue(),!isLeft);
      result.add(output);
      joinedValue.setMatch(true);
    }
    if (tuple != null) {
      tuple.setMatch(true);
    }
    if (result.size() != 0) {
      outputPort.emit(result);
      tuplesCount+=result.size();
    }
  }
}

private void join ( TimeEvent tuple , boolean isLeft ) { ArrayList < TimeEvent > value ; JoinStore store = isLeft ? rightStore . getStore ( ) : leftStore . getStore ( ) ; if ( tuple != null ) { value = ( ArrayList < TimeEvent > ) store . getValidTuples ( tuple ) ; } else { value = ( ArrayList < TimeEvent > ) store . getUnMatchedTuples ( ) ; } if ( value != null ) { List < T > result = new ArrayList < > ( ) ; for ( TimeEvent joinedValue : value ) { T output = createOutputTuple ( ) ; Object tupleValue = null ; if ( tuple != null ) { tupleValue = tuple . getValue ( ) ; } copyValue ( output , tupleValue , isLeft ) ; copyValue ( output , joinedValue . getValue ( ) , ! isLeft ) ; result . add ( output ) ; joinedValue . setMatch ( true ) ; } if ( tuple != null ) { tuple . setMatch ( true ) ; } if ( result . size ( ) != 0 ) { outputPort . emit ( result ) ; tuplesCount += result . size ( ) ; } } }
get the tuples from another store based on join constraint and key
