List of usage examples for java.time LocalDateTime minusSeconds
public LocalDateTime minusSeconds(long seconds)
From source file:com.streamsets.pipeline.stage.origin.jdbc.cdc.oracle.OracleCDCSource.java
private LocalDateTime adjustStartTime(LocalDateTime startTime) { return useLocalBuffering ? startTime : startTime.minusSeconds(configBean.txnWindow); }
From source file:com.streamsets.pipeline.stage.origin.jdbc.cdc.oracle.OracleCDCSource.java
/** * An element is "expired" if the transaction started before the current window being processed * and if no records have actually been sent to the pipeline. If a record has been sent, then a commit was seen, * so it is not expired./*from w ww . j ava 2 s . c o m*/ * @param entry * @return */ private boolean expired(Map.Entry<TransactionIdKey, HashQueue<RecordSequence>> entry, LocalDateTime startTime) { return startTime != null && // Can be null if starting from SCN and first batch is not complete yet. entry.getKey().txnStartTime.isBefore(startTime.minusSeconds(configBean.txnWindow)) && entry.getValue().peek().seq == 1; }