public static JobBatchRecordStream jobBatchRecords(final JobBatchIntent intent) { return jobBatchRecords().withIntent(intent); }
@Override protected JobBatchRecordStream supply(final Stream<Record<JobBatchRecordValue>> wrappedStream) { return new JobBatchRecordStream(wrappedStream); }
public JobBatchRecordStream receiveFirstJobBatchCommands() { return RecordingExporter.jobBatchRecords().withPartitionId(partitionId).onlyCommands(); }
client.receiveFirstJobBatchCommands().withIntent(JobBatchIntent.ACTIVATE).getFirst(); assertThat(jobActivated.getSourceRecordPosition()) .isNotEqualTo(firstActivateCommand.getPosition()); client .receiveFirstJobBatchCommands() .withIntent(JobBatchIntent.ACTIVATE) .skipUntil(s -> s.getPosition() > firstActivateCommand.getPosition()) .findFirst() .get();
public JobBatchRecordStream withAmount(final int amount) { return valueFilter(v -> v.getAmount() == amount); } }
public JobBatchRecordStream receiveJobBatchs() { return RecordingExporter.jobBatchRecords().withPartitionId(partitionId); }
client.receiveFirstJobBatchCommands().withIntent(JobBatchIntent.ACTIVATE).getFirst(); assertThat(jobActivated.getSourceRecordPosition()) .isNotEqualTo(firstActivateCommand.getPosition()); client .receiveFirstJobBatchCommands() .withIntent(JobBatchIntent.ACTIVATE) .skipUntil(s -> s.getPosition() > firstActivateCommand.getPosition()) .findFirst() .get();
public JobBatchRecordStream withAmount(final int amount) { return valueFilter(v -> v.getAmount() == amount); } }
public JobBatchRecordStream receiveJobBatchs() { return RecordingExporter.jobBatchRecords().withPartitionId(partitionId); }
public JobBatchRecordStream withWorker(final String worker) { return valueFilter(v -> worker.equals(v.getWorker())); }
public JobBatchRecordStream receiveFirstJobBatchCommands() { return RecordingExporter.jobBatchRecords().withPartitionId(partitionId).onlyCommands(); }
public static JobBatchRecordStream jobBatchRecords(final JobBatchIntent intent) { return jobBatchRecords().withIntent(intent); }
@Override protected JobBatchRecordStream supply(final Stream<Record<JobBatchRecordValue>> wrappedStream) { return new JobBatchRecordStream(wrappedStream); }
public JobBatchRecordStream withType(final String type) { return valueFilter(v -> type.equals(v.getType())); }
public static JobBatchRecordStream jobBatchRecords() { return new JobBatchRecordStream(records(ValueType.JOB_BATCH, JobBatchRecordValue.class)); }
public JobBatchRecordStream withWorker(final String worker) { return valueFilter(v -> worker.equals(v.getWorker())); }