Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
This commit is contained in:
committed by
Michael Minella
parent
3a2fc7d2ee
commit
cb03c1c7ed
@@ -2,5 +2,9 @@
|
||||
* Components for executing item processing asynchronously and writing the results when processing is complete.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
package org.springframework.batch.integration.async;
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.async;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2018 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.
|
||||
@@ -19,11 +19,13 @@ package org.springframework.batch.integration.chunk;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.batch.core.StepContribution;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Encapsulates a response to processing a chunk of items, summarising the result as a {@link StepContribution}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class ChunkResponse implements Serializable {
|
||||
@@ -50,7 +52,7 @@ public class ChunkResponse implements Serializable {
|
||||
this(status, sequence, jobId, stepContribution, null);
|
||||
}
|
||||
|
||||
public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, String message) {
|
||||
public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, @Nullable String message) {
|
||||
this(status, sequence, jobId, stepContribution, message, false);
|
||||
}
|
||||
|
||||
@@ -58,7 +60,7 @@ public class ChunkResponse implements Serializable {
|
||||
this(input.status, input.sequence, input.jobId, input.stepContribution, input.message, redelivered);
|
||||
}
|
||||
|
||||
public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, String message, boolean redelivered) {
|
||||
public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, @Nullable String message, boolean redelivered) {
|
||||
this.status = status;
|
||||
this.sequence = sequence;
|
||||
this.jobId = jobId;
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
* Components for remote chunking.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
package org.springframework.batch.integration.chunk;
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.chunk;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2018 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* APIs for the configuration of Spring Integration components through annotations.
|
||||
*
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.config.annotation;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2018 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* APIs for the configuration of Spring Integration components through XML.
|
||||
*
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.config.xml;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
@@ -2,5 +2,9 @@
|
||||
* Message based job launching components.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
package org.springframework.batch.integration.launch;
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.launch;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
|
||||
@@ -213,7 +213,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler, Initial
|
||||
final Set<StepExecution> split = stepExecutionSplitter.split(masterStepExecution, gridSize);
|
||||
|
||||
if(CollectionUtils.isEmpty(split)) {
|
||||
return null;
|
||||
return split;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
* Remote partitioning components.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
package org.springframework.batch.integration.partition;
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.partition;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2018 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support classes related to steps when used with Spring Integration.
|
||||
*
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
@NonNullApi
|
||||
package org.springframework.batch.integration.step;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
Reference in New Issue
Block a user