@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (streamsRegistered) { ChunkMonitorData data = getData(); if (data.offset == 0) { // Only call the underlying update method if we are on a chunk // boundary stream.update(executionContext); executionContext.remove(getExecutionContextKey(OFFSET)); } else { executionContext.putInt(getExecutionContextKey(OFFSET), data.offset); } } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); if (streamsRegistered) { stream.open(executionContext); ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0); holder.set(data); if (reader == null) { logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data."); return; } for (int i = 0; i < data.offset; i++) { try { reader.read(); } catch (Exception e) { throw new ItemStreamException("Could not position reader with offset: " + data.offset, e); } } resetOffset(); } }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (streamsRegistered) { ChunkMonitorData data = getData(); if (data.offset == 0) { // Only call the underlying update method if we are on a chunk // boundary stream.update(executionContext); executionContext.remove(getExecutionContextKey(OFFSET)); } else { executionContext.putInt(getExecutionContextKey(OFFSET), data.offset); } } }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (streamsRegistered) { ChunkMonitorData data = getData(); if (data.offset == 0) { // Only call the underlying update method if we are on a chunk // boundary stream.update(executionContext); executionContext.remove(getExecutionContextKey(OFFSET)); } else { executionContext.putInt(getExecutionContextKey(OFFSET), data.offset); } } }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (streamsRegistered) { ChunkMonitorData data = getData(); if (data.offset == 0) { // Only call the underlying update method if we are on a chunk // boundary stream.update(executionContext); executionContext.remove(getExecutionContextKey(OFFSET)); } else { executionContext.putInt(getExecutionContextKey(OFFSET), data.offset); } } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); if (streamsRegistered) { stream.open(executionContext); ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0); holder.set(data); if (reader == null) { logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data."); return; } for (int i = 0; i < data.offset; i++) { try { reader.read(); } catch (Exception e) { throw new ItemStreamException("Could not position reader with offset: " + data.offset, e); } } resetOffset(); } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); if (streamsRegistered) { stream.open(executionContext); ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0); holder.set(data); if (reader == null) { logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data."); return; } for (int i = 0; i < data.offset; i++) { try { reader.read(); } catch (Exception e) { throw new ItemStreamException("Could not position reader with offset: " + data.offset, e); } } resetOffset(); } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); if (streamsRegistered) { stream.open(executionContext); ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0); holder.set(data); if (reader == null) { logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data."); return; } for (int i = 0; i < data.offset; i++) { try { reader.read(); } catch (Exception e) { throw new ItemStreamException("Could not position reader with offset: " + data.offset, e); } } resetOffset(); } }