@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Thread-safe database {@link ItemReader} implementing the process indicator pattern.
|
||||
*
|
||||
* <p>
|
||||
* To achieve restartability use together with {@link StagingItemProcessor}.
|
||||
*/
|
||||
public class StagingItemReader<T>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2022 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -69,7 +69,7 @@ public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutio
|
||||
/**
|
||||
* Serialize the item to the staging table, and add a NEW processed flag.
|
||||
*
|
||||
* @see ItemWriter#write(java.util.List)
|
||||
* @see ItemWriter#write(Chunk)
|
||||
*/
|
||||
@Override
|
||||
public void write(final Chunk<? extends T> chunk) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,7 @@ package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
/**
|
||||
* An XML customer.
|
||||
*
|
||||
* <p>
|
||||
* This is a complex type.
|
||||
*/
|
||||
public class Customer {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,7 @@ package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
/**
|
||||
* An XML line-item.
|
||||
*
|
||||
* <p>
|
||||
* This is a complex type.
|
||||
*/
|
||||
public class LineItem {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2014 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* An XML order.
|
||||
*
|
||||
* <p>
|
||||
* This is a complex type.
|
||||
*/
|
||||
public class Order {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,7 @@ package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
/**
|
||||
* An XML shipper.
|
||||
*
|
||||
* <p>
|
||||
* This is a complex type.
|
||||
*/
|
||||
public class Shipper {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2020 the original author or authors.
|
||||
* Copyright 2020-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
/**
|
||||
* Ensure a MongoDB instance is running on "localhost:27017", otherwise modify
|
||||
* mongodb-sample.properties file as needed.
|
||||
*
|
||||
* <p>
|
||||
* If you use docker, you can run a mongo db server with: "docker run --name mongodb --rm
|
||||
* -d -p 27017:27017 mongo"
|
||||
*
|
||||
|
||||
@@ -61,12 +61,11 @@ class RestartFunctionalTests {
|
||||
JdbcTestUtils.deleteFromTables(jdbcTemplate, "TRADE");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Job fails on first run, because the module throws exception after processing more
|
||||
* than half of the input. On the second run, the job should finish successfully,
|
||||
* because it continues execution where the previous run stopped (module throws
|
||||
* exception after fixed number of processed records).
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
void testLaunchJob() throws Exception {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2021 the original author or authors.
|
||||
* Copyright 2008-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -55,7 +55,7 @@ public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @return the skip count
|
||||
*/
|
||||
private long getSkipCount() {
|
||||
if (stepExecution == null || stepName == null) {
|
||||
|
||||
Reference in New Issue
Block a user