Exemple #1
0
 private <W extends BoundedWindow> WindowingStrategy<?, W> getOutputWindowing(
     WindowingStrategy<?, W> inputStrategy) {
   if (inputStrategy.getWindowFn() instanceof InvalidWindows) {
     @SuppressWarnings("unchecked")
     InvalidWindows<W> invalidWindows = (InvalidWindows<W>) inputStrategy.getWindowFn();
     return inputStrategy.withWindowFn(invalidWindows.getOriginalWindowFn());
   } else {
     return inputStrategy;
   }
 }
Exemple #2
0
 // Rawtype cast of OutputTimeFn cannot be eliminated with intermediate variable, as it is
 // casting between wildcards
 public WindowingStrategy<?, ?> getOutputStrategyInternal(
     WindowingStrategy<?, ?> inputStrategy) {
   WindowingStrategy<?, ?> result = inputStrategy;
   if (windowFn != null) {
     result = result.withWindowFn(windowFn);
   }
   if (trigger != null) {
     result = result.withTrigger(trigger);
   }
   if (mode != null) {
     result = result.withMode(mode);
   }
   if (allowedLateness != null) {
     result = result.withAllowedLateness(allowedLateness);
   }
   if (closingBehavior != null) {
     result = result.withClosingBehavior(closingBehavior);
   }
   if (outputTimeFn != null) {
     result = result.withOutputTimeFn(outputTimeFn);
   }
   return result;
 }