public interface RepeatContext
extends org.springframework.core.AttributeAccessor
RepeatOperations
. Within a batch callback code can communicate via
the AttributeAccessor
interface.RepeatOperations.iterate(RepeatCallback)
Modifier and Type | Method and Description |
---|---|
void |
close()
Allow resources to be cleared, especially in destruction callbacks.
|
RepeatContext |
getParent()
If batches are nested, then the inner batch will be created with the
outer one as a parent.
|
int |
getStartedCount()
Public access to a counter for the number of operations attempted.
|
boolean |
isCompleteOnly()
Public accessor for the complete flag.
|
boolean |
isTerminateOnly()
Public accessor for the termination flag.
|
void |
registerDestructionCallback(String name,
Runnable callback)
Register a callback to be executed on close, associated with the
attribute having the given name.
|
void |
setCompleteOnly()
Signal to the framework that the current batch should complete normally,
independent of the current
CompletionPolicy . |
void |
setTerminateOnly()
Signal to the framework that the current batch should complete
abnormally, independent of the current
CompletionPolicy . |
RepeatContext getParent()
int getStartedCount()
void setCompleteOnly()
CompletionPolicy
.boolean isCompleteOnly()
void setTerminateOnly()
CompletionPolicy
.boolean isTerminateOnly()
void registerDestructionCallback(String name, Runnable callback)
Runnable
callback should not
throw any exceptions.name
- the name of the attribute to associated this callback with.
If this attribute is removed the callback should never be called.callback
- a Runnable
to execute when the context is closed.void close()
Copyright © 2014 Pivotal. All rights reserved.