RESOLVED - issue BATCH-362: Rename ExecutionAttributes to ExecutionContext
http://jira.springframework.org/browse/BATCH-362
This commit is contained in:
@@ -43,7 +43,7 @@ public interface Step {
|
||||
* Flag to indicate if restart data needs to be saved for this step.
|
||||
* @return true if restart data should be saved
|
||||
*/
|
||||
boolean isSaveExecutionAttributes();
|
||||
boolean isSaveExecutionContext();
|
||||
|
||||
/**
|
||||
* @return the number of times a job can be started with the same
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.batch.core.domain;
|
||||
|
||||
import org.springframework.batch.item.ExecutionAttributes;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
|
||||
/**
|
||||
* Represents a contribution to a {@link StepExecution}, buffering changes
|
||||
@@ -30,7 +30,7 @@ public class StepContribution {
|
||||
|
||||
private StepExecution execution;
|
||||
|
||||
private ExecutionAttributes executionAttributes;
|
||||
private ExecutionContext executionContext;
|
||||
|
||||
private int commitCount;
|
||||
|
||||
@@ -67,18 +67,18 @@ public class StepContribution {
|
||||
/**
|
||||
* Set the statistics properties.
|
||||
*
|
||||
* @param executionAttributes
|
||||
* @param executionContext
|
||||
*/
|
||||
public void setExecutionAttributes(ExecutionAttributes executionAttributes) {
|
||||
this.executionAttributes = executionAttributes;
|
||||
public void setExecutionContext(ExecutionContext executionContext) {
|
||||
this.executionContext = executionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public getter for the {@link ExecutionAttributes}.
|
||||
* Public getter for the {@link ExecutionContext}.
|
||||
* @return the stream context
|
||||
*/
|
||||
public ExecutionAttributes getExecutionAttributes() {
|
||||
return executionAttributes;
|
||||
public ExecutionContext getExecutionContext() {
|
||||
return executionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.batch.core.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.batch.item.ExecutionAttributes;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ public class StepExecution extends Entity {
|
||||
|
||||
private Date endTime = null;
|
||||
|
||||
private ExecutionAttributes executionAttributes = new ExecutionAttributes();
|
||||
private ExecutionContext executionContext = new ExecutionContext();
|
||||
|
||||
private ExitStatus exitStatus = ExitStatus.UNKNOWN;
|
||||
|
||||
@@ -106,21 +106,21 @@ public class StepExecution extends Entity {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link ExecutionAttributes} for this execution
|
||||
* Returns the {@link ExecutionContext} for this execution
|
||||
*
|
||||
* @return the attributes
|
||||
*/
|
||||
public ExecutionAttributes getExecutionAttributes() {
|
||||
return executionAttributes;
|
||||
public ExecutionContext getExecutionContext() {
|
||||
return executionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link ExecutionAttributes} for this execution
|
||||
* Sets the {@link ExecutionContext} for this execution
|
||||
*
|
||||
* @param executionAttributes the attributes
|
||||
* @param executionContext the attributes
|
||||
*/
|
||||
public void setExecutionAttributes(ExecutionAttributes executionAttributes) {
|
||||
this.executionAttributes = executionAttributes;
|
||||
public void setExecutionContext(ExecutionContext executionContext) {
|
||||
this.executionContext = executionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,7 +346,7 @@ public class StepExecution extends Entity {
|
||||
*/
|
||||
public synchronized void apply(StepContribution contribution) {
|
||||
taskCount += contribution.getTaskCount();
|
||||
executionAttributes = contribution.getExecutionAttributes();
|
||||
executionContext = contribution.getExecutionContext();
|
||||
commitCount += contribution.getCommitCount();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class StepSupport implements Step, BeanNameAware {
|
||||
|
||||
private boolean allowStartIfComplete;
|
||||
|
||||
private boolean saveExecutionAttributes = false;
|
||||
private boolean saveExecutionContext = false;
|
||||
|
||||
/**
|
||||
* Default constructor for {@link StepSupport}.
|
||||
@@ -102,12 +102,12 @@ public class StepSupport implements Step, BeanNameAware {
|
||||
this.allowStartIfComplete = allowStartIfComplete;
|
||||
}
|
||||
|
||||
public void setSaveExecutionAttributes(boolean saveExecutionAttributes) {
|
||||
this.saveExecutionAttributes = saveExecutionAttributes;
|
||||
public void setSaveExecutionContext(boolean saveExecutionContext) {
|
||||
this.saveExecutionContext = saveExecutionContext;
|
||||
}
|
||||
|
||||
public boolean isSaveExecutionAttributes() {
|
||||
return saveExecutionAttributes;
|
||||
public boolean isSaveExecutionContext() {
|
||||
return saveExecutionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.batch.core.domain.JobExecution;
|
||||
import org.springframework.batch.core.domain.JobInstance;
|
||||
import org.springframework.batch.core.domain.JobParameters;
|
||||
import org.springframework.batch.core.domain.StepExecution;
|
||||
import org.springframework.batch.item.ExecutionAttributes;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -29,7 +29,7 @@ import org.springframework.batch.item.ExecutionAttributes;
|
||||
* must first be obtained using the findOrCreateJob method. Once a Job and it's
|
||||
* related steps are obtained, they can be updated. It should be noted that any
|
||||
* reconstituted steps are expected to contain restart data <strong>if the step
|
||||
* says it wants to be restored after a restart, and {@link ExecutionAttributes}
|
||||
* says it wants to be restored after a restart, and {@link ExecutionContext}
|
||||
* exists.</strong>
|
||||
* </p>
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user