OPEN - issue BATCH-789: Remove mark/reset from ItemReader

Deprecate methods
This commit is contained in:
dsyer
2008-08-20 12:32:59 +00:00
parent a49d0531da
commit dbc24626f3
7 changed files with 4 additions and 12 deletions

View File

@@ -126,7 +126,6 @@ public class ItemOrientedStepHandler<T, S> implements StepHandler {
/**
* @throws MarkFailedException
* @see org.springframework.batch.item.ItemReader#mark()
*/
public void mark() throws MarkFailedException {
itemReader.mark();
@@ -134,7 +133,6 @@ public class ItemOrientedStepHandler<T, S> implements StepHandler {
/**
* @throws ResetFailedException
* @see org.springframework.batch.item.ItemReader#reset()
*/
public void reset() throws ResetFailedException {
itemReader.reset();

View File

@@ -48,14 +48,12 @@ public interface StepHandler {
/**
* Implementations should delegate to an {@link ItemReader}.
*
* @see org.springframework.batch.item.ItemReader#mark()
*/
void mark() throws MarkFailedException;
/**
* Implementations should delegate to an {@link ItemReader}.
*
* @see org.springframework.batch.item.ItemReader#reset()
*/
void reset() throws ResetFailedException;

View File

@@ -58,6 +58,8 @@ public interface ItemReader<T> {
* @throws MarkFailedException if there is a problem with the mark. If a
* mark fails inside a transaction, it would be worrying, but not normally
* fatal.
*
* @deprecated
*/
void mark() throws MarkFailedException;
@@ -70,6 +72,8 @@ public interface ItemReader<T> {
* reset fails inside a transaction, it would normally be fatal, and would
* leave the stream in an inconsistent state. So while this is an unchecked
* exception, it may be important for a client to catch it explicitly.
*
* @deprecated
*/
void reset() throws ResetFailedException;

View File

@@ -182,8 +182,6 @@ public class DrivingQueryItemReader<T> implements ItemReader<T>, InitializingBea
* single-threaded environment. The state backing the mark is a single
* counter, keeping track of the current position, so multiple threads
* cannot be accommodated.
*
* @see org.springframework.batch.item.ItemReader#mark()
*/
public void mark() {
lastCommitIndex = currentIndex;

View File

@@ -125,8 +125,6 @@ public class HibernateCursorItemReader<T> extends AbstractBufferedItemReaderItem
* single-threaded environment. The state backing the mark is a single
* counter, keeping track of the current position, so multiple threads
* cannot be accommodated.
*
* @see org.springframework.batch.item.ItemReader#mark()
*/
public void mark() {

View File

@@ -167,8 +167,6 @@ public class MultiResourceItemReader<T> extends ExecutionContextUserSupport impl
/**
* Switches to 'read from buffer' state.
*
* @see ItemReader#reset()
*/
public void reset() throws ResetFailedException {
if (!itemBuffer.isEmpty()) {

View File

@@ -206,8 +206,6 @@ public class StagingItemReader<T> extends JdbcDaoSupport implements ItemStream,
* resources (using
* {@link TransactionSynchronizationManager#bindResource(Object, Object)}),
* so they are thread bound.
*
* @see org.springframework.batch.item.ItemReader#mark()
*/
public void mark() {
getBuffer().commit();