|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepeatContext
Base interface for context which controls the state and completion /
termination of a batch step. A new context is created for each call to the
RepeatOperations
. Within a batch callback code can communicate via
the AttributeAccessor
interface.
RepeatOperations.iterate(RepeatCallback)
Method Summary | |
---|---|
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 . |
Methods inherited from interface org.springframework.core.AttributeAccessor |
---|
attributeNames, getAttribute, hasAttribute, removeAttribute, setAttribute |
Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |