diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/item/reader/StagingItemReader.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/item/reader/StagingItemReader.java index ef7c1b041..98f0872cb 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/item/reader/StagingItemReader.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/item/reader/StagingItemReader.java @@ -13,7 +13,7 @@ import org.springframework.batch.execution.scope.StepContext; import org.springframework.batch.execution.scope.StepContextAware; import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.KeyedItemReader; -import org.springframework.batch.item.StreamContext; +import org.springframework.batch.item.ExecutionAttributes; import org.springframework.batch.sample.item.writer.StagingItemWriter; import org.springframework.beans.factory.DisposableBean; import org.springframework.dao.OptimisticLockingFailureException; @@ -219,7 +219,7 @@ public class StagingItemReader extends JdbcDaoSupport implements ItemStream, Key * (non-Javadoc) * @see org.springframework.batch.item.ItemStream#mark(org.springframework.batch.item.StreamContext) */ - public void mark(StreamContext streamContext) { + public void mark(ExecutionAttributes streamContext) { getBuffer().commit(); } @@ -227,7 +227,7 @@ public class StagingItemReader extends JdbcDaoSupport implements ItemStream, Key * (non-Javadoc) * @see org.springframework.batch.item.ItemStream#reset(org.springframework.batch.item.StreamContext) */ - public void reset(StreamContext streamContext) { + public void reset(ExecutionAttributes streamContext) { getBuffer().rollback(); } @@ -235,7 +235,7 @@ public class StagingItemReader extends JdbcDaoSupport implements ItemStream, Key * (non-Javadoc) * @see org.springframework.batch.item.ItemStream#restoreFrom(org.springframework.batch.item.StreamContext) */ - public void restoreFrom(StreamContext context) { + public void restoreFrom(ExecutionAttributes context) { // no-op } @@ -243,8 +243,8 @@ public class StagingItemReader extends JdbcDaoSupport implements ItemStream, Key * (non-Javadoc) * @see org.springframework.batch.item.StreamContextProvider#getStreamContext() */ - public StreamContext getStreamContext() { - return new StreamContext(); + public ExecutionAttributes getStreamContext() { + return new ExecutionAttributes(); } } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/InfiniteLoopTasklet.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/InfiniteLoopTasklet.java index d8ef7c6ef..7901dc46c 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/InfiniteLoopTasklet.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/InfiniteLoopTasklet.java @@ -17,7 +17,7 @@ package org.springframework.batch.sample.tasklet; import org.springframework.batch.core.tasklet.Tasklet; -import org.springframework.batch.item.StreamContext; +import org.springframework.batch.item.ExecutionAttributes; import org.springframework.batch.item.StreamContextProvider; import org.springframework.batch.repeat.ExitStatus; import org.springframework.batch.support.PropertiesConverter; @@ -51,8 +51,8 @@ public class InfiniteLoopTasklet implements Tasklet, StreamContextProvider { * (non-Javadoc) * @see org.springframework.batch.item.stream.ItemStreamAdapter#getStreamContext() */ - public StreamContext getStreamContext() { - return new StreamContext(PropertiesConverter.stringToProperties("count=" + count)); + public ExecutionAttributes getStreamContext() { + return new ExecutionAttributes(PropertiesConverter.stringToProperties("count=" + count)); } } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/SimpleTradeTasklet.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/SimpleTradeTasklet.java index 4f43b1a78..70b8b47a3 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/SimpleTradeTasklet.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/tasklet/SimpleTradeTasklet.java @@ -19,7 +19,7 @@ package org.springframework.batch.sample.tasklet; import org.springframework.batch.core.tasklet.Tasklet; import org.springframework.batch.execution.tasklet.ItemOrientedTasklet; import org.springframework.batch.io.file.DefaultFlatFileItemReader; -import org.springframework.batch.item.StreamContext; +import org.springframework.batch.item.ExecutionAttributes; import org.springframework.batch.item.StreamContextProvider; import org.springframework.batch.repeat.ExitStatus; import org.springframework.batch.sample.dao.TradeDao; @@ -86,8 +86,8 @@ public class SimpleTradeTasklet implements Tasklet, StreamContextProvider { /* (non-Javadoc) * @see org.springframework.batch.item.StreamContextProvider#getStreamContext() */ - public StreamContext getStreamContext() { - StreamContext statistics = new StreamContext(); + public ExecutionAttributes getStreamContext() { + ExecutionAttributes statistics = new ExecutionAttributes(); statistics.putLong("trade.count", tradeCount); return statistics; }