@Override public void open(ExecutionContext executionContext) { super.open(executionContext); opened = true; }
/** * Close the {@link #setDelegate(ResourceAwareItemReaderItemStream)} reader and reset instance variable values. */ @Override public void close() throws ItemStreamException { super.close(); if(!this.noInput) { delegate.close(); } noInput = false; }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); executionContext.putInt(getExecutionContextKey("COUNT"), counter.get()); }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); counter.set(executionContext.getInt(getExecutionContextKey("COUNT"), 0)); }
/** * Store the current resource index and position in the resource. */ @Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (saveState) { executionContext.putInt(getExecutionContextKey(RESOURCE_KEY), currentResource); delegate.update(executionContext); } }
@Override public void close() { super.close(); closed = true; }
super.open(executionContext); Assert.notNull(resources, "Resources must be set");
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (saveState) { Assert.notNull(executionContext, "ExecutionContext must not be null"); executionContext.putInt(getExecutionContextKey(READ_COUNT), currentItemCount); if (maxItemCount < Integer.MAX_VALUE) { executionContext.putInt(getExecutionContextKey(READ_COUNT_MAX), maxItemCount); } } }
@Override public void close() throws ItemStreamException { super.close(); currentItemCount = 0; try { doClose(); } catch (Exception e) { throw new ItemStreamException("Error while closing item reader", e); } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); index = (int) executionContext.getLong(getExecutionContextKey("POSITION"), min); }
@Override public void update(ExecutionContext executionContext) { super.update(executionContext); getExecutionAttributesCalled = true; executionContext.putString("spam", "bucket"); }
/** * Close the {@link #setDelegate(ResourceAwareItemReaderItemStream)} reader and reset instance variable values. */ @Override public void close() throws ItemStreamException { super.close(); if(!this.noInput) { delegate.close(); } noInput = false; }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); try { doOpen();
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); executionContext.putLong(getExecutionContextKey("POSITION"), index); }
@Override public void close() throws ItemStreamException { super.close(); currentItemCount = 0; try { doClose(); } catch (Exception e) { throw new ItemStreamException("Error while closing item reader", e); } }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); this.executionContext = executionContext; previousResource = null; }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); executionContext.putInt(getExecutionContextKey("COUNT"), counter.get()); }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); counter.set(executionContext.getInt(getExecutionContextKey("COUNT"), 0)); }
@Override public void update(ExecutionContext executionContext) throws ItemStreamException { super.update(executionContext); if (saveState) { Assert.notNull(executionContext, "ExecutionContext must not be null"); executionContext.putInt(getExecutionContextKey(READ_COUNT), currentItemCount); if (maxItemCount < Integer.MAX_VALUE) { executionContext.putInt(getExecutionContextKey(READ_COUNT_MAX), maxItemCount); } } }
super.open(executionContext); Assert.notNull(resources, "Resources must be set");