OPEN - BATCH-803: Add non-buffering ChunkOrientedTasklet (or option in existing one) plus flag for factory bean

made helper methods static where appropriate
This commit is contained in:
robokaso
2008-09-17 08:23:44 +00:00
parent 1439d07281
commit 769a1a4c70

View File

@@ -163,7 +163,7 @@ public class ChunkOrientedTasklet<T, S> extends AbstractItemProcessingTasklet<T,
/**
* @param attributes
*/
private void clearInputs(AttributeAccessor attributes) {
private static void clearInputs(AttributeAccessor attributes) {
attributes.removeAttribute(INPUT_BUFFER_KEY);
}
@@ -195,11 +195,11 @@ public class ChunkOrientedTasklet<T, S> extends AbstractItemProcessingTasklet<T,
* @param inputBufferKey
* @param outputs
*/
private <W> void store(AttributeAccessor attributes, String key, W value) {
private static <W> void store(AttributeAccessor attributes, String key, W value) {
attributes.setAttribute(key, value);
}
private void clearAll(AttributeAccessor attributes) {
private static void clearAll(AttributeAccessor attributes) {
for (String key : attributes.attributeNames()) {
attributes.removeAttribute(key);
}
@@ -218,7 +218,7 @@ public class ChunkOrientedTasklet<T, S> extends AbstractItemProcessingTasklet<T,
* @param inputBufferKey
* @return
*/
private <W> Chunk<W> getBuffer(AttributeAccessor attributes, String key) {
private static <W> Chunk<W> getBuffer(AttributeAccessor attributes, String key) {
if (!attributes.hasAttribute(key)) {
return new Chunk<W>();
}