@Override public void schedule(K key, long time) { callbackScheduler.scheduleCallback(key, time, (k, collector, coordinator) -> { final ScheduledFunction<K, RM> scheduledFn = getOperatorSpec().getScheduledFn(); if (scheduledFn != null) { final Collection<RM> output = scheduledFn.onCallback(key, time); if (!output.isEmpty()) { output.forEach(rm -> registeredOperators.forEach(op -> op.onMessage(rm, collector, coordinator))); } } else { throw new SamzaException( String.format("Operator %s id %s (created at %s) must implement ScheduledFunction to use system timer.", getOperatorSpec().getOpCode().name(), getOpImplId(), getOperatorSpec().getSourceLocation())); } }); }
@Override public void schedule(K key, long time) { callbackScheduler.scheduleCallback(key, time, (k, collector, coordinator) -> { final ScheduledFunction<K, RM> scheduledFn = getOperatorSpec().getScheduledFn(); if (scheduledFn != null) { final Collection<RM> output = scheduledFn.onCallback(key, time); if (!output.isEmpty()) { output.forEach(rm -> registeredOperators.forEach(op -> op.onMessage(rm, collector, coordinator))); } } else { throw new SamzaException( String.format("Operator %s id %s (created at %s) must implement ScheduledFunction to use system timer.", getOperatorSpec().getOpCode().name(), getOpImplId(), getOperatorSpec().getSourceLocation())); } }); }
@Override public void schedule(K key, long time) { callbackScheduler.scheduleCallback(key, time, (k, collector, coordinator) -> { final ScheduledFunction<K, RM> scheduledFn = getOperatorSpec().getScheduledFn(); if (scheduledFn != null) { final Collection<RM> output = scheduledFn.onCallback(key, time); if (!output.isEmpty()) { output.forEach(rm -> registeredOperators.forEach(op -> op.onMessage(rm, collector, coordinator))); } } else { throw new SamzaException( String.format("Operator %s id %s (created at %s) must implement ScheduledFunction to use system timer.", getOperatorSpec().getOpCode().name(), getOpImplId(), getOperatorSpec().getSourceLocation())); } }); }
@Override public void schedule(K key, long time) { callbackScheduler.scheduleCallback(key, time, (k, collector, coordinator) -> { final ScheduledFunction<K, RM> scheduledFn = getOperatorSpec().getScheduledFn(); if (scheduledFn != null) { final Collection<RM> output = scheduledFn.onCallback(key, time); if (!output.isEmpty()) { output.forEach(rm -> registeredOperators.forEach(op -> op.onMessage(rm, collector, coordinator))); } } else { throw new SamzaException( String.format("Operator %s id %s (created at %s) must implement ScheduledFunction to use system timer.", getOperatorSpec().getOpCode().name(), getOpImplId(), getOperatorSpec().getSourceLocation())); } }); }
@Override public void schedule(K key, long time) { callbackScheduler.scheduleCallback(key, time, (k, collector, coordinator) -> { final ScheduledFunction<K, RM> scheduledFn = getOperatorSpec().getScheduledFn(); if (scheduledFn != null) { final Collection<RM> output = scheduledFn.onCallback(key, time); if (!output.isEmpty()) { output.forEach(rm -> registeredOperators.forEach(op -> op.onMessage(rm, collector, coordinator))); } } else { throw new SamzaException( String.format("Operator %s id %s (created at %s) must implement ScheduledFunction to use system timer.", getOperatorSpec().getOpCode().name(), getOpImplId(), getOperatorSpec().getSourceLocation())); } }); }