IN PROGRESS - issue BATCH-7: Remove transaction synchronization and state management from input/output sources (formerly buffering)
http://jira.springframework.org/browse/BATCH-7 Remove some references to Statistics
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.batch.core.domain;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.springframework.batch.item.StreamContext;
|
||||
|
||||
/**
|
||||
* Represents a contribution to a {@link StepExecution}, buffering changes
|
||||
@@ -30,7 +30,7 @@ public class StepContribution {
|
||||
|
||||
private StepExecution execution;
|
||||
|
||||
private Properties statistics;
|
||||
private StreamContext streamContext;
|
||||
|
||||
private int commitCount;
|
||||
|
||||
@@ -57,15 +57,6 @@ public class StepContribution {
|
||||
return taskCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the statistics properties.
|
||||
*
|
||||
* @param statistics
|
||||
*/
|
||||
public void setStatistics(Properties statistics) {
|
||||
this.statistics = statistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the commit counter.
|
||||
*/
|
||||
@@ -74,11 +65,20 @@ public class StepContribution {
|
||||
}
|
||||
|
||||
/**
|
||||
* Public getter for the statistics.
|
||||
* @return the statistics
|
||||
* Set the statistics properties.
|
||||
*
|
||||
* @param streamContext
|
||||
*/
|
||||
public Properties getStatistics() {
|
||||
return statistics;
|
||||
public void setStreamContext(StreamContext streamContext) {
|
||||
this.streamContext = streamContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public getter for the {@link StreamContext}.
|
||||
* @return the stream context
|
||||
*/
|
||||
public StreamContext getStreamContext() {
|
||||
return streamContext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
package org.springframework.batch.core.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.batch.item.StreamContext;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public class StepExecution extends Entity {
|
||||
|
||||
private Date endTime = null;
|
||||
|
||||
private Properties statistics = new Properties();
|
||||
private StreamContext streamContext = new StreamContext();
|
||||
|
||||
private ExitStatus exitStatus = ExitStatus.UNKNOWN;
|
||||
|
||||
@@ -88,12 +88,12 @@ public class StepExecution extends Entity {
|
||||
taskCount++;
|
||||
}
|
||||
|
||||
public Properties getStatistics() {
|
||||
return statistics;
|
||||
public StreamContext getStreamContext() {
|
||||
return streamContext;
|
||||
}
|
||||
|
||||
public void setStatistics(Properties statistics) {
|
||||
this.statistics = statistics;
|
||||
public void setStreamContext(StreamContext statistics) {
|
||||
this.streamContext = statistics;
|
||||
}
|
||||
|
||||
public Integer getCommitCount() {
|
||||
@@ -249,7 +249,7 @@ public class StepExecution extends Entity {
|
||||
*/
|
||||
public synchronized void apply(StepContribution contribution) {
|
||||
taskCount += contribution.getTaskCount();
|
||||
statistics = contribution.getStatistics();
|
||||
streamContext = contribution.getStreamContext();
|
||||
commitCount += contribution.getCommitCount();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user