|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.repeat.context.SynchronizedAttributeAccessor org.springframework.batch.repeat.context.RepeatContextSupport
public class RepeatContextSupport
Constructor Summary | |
---|---|
RepeatContextSupport(RepeatContext parent)
Constructor for RepeatContextSupport . |
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. |
void |
increment()
Used by clients to increment the started count. |
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 class org.springframework.batch.repeat.context.SynchronizedAttributeAccessor |
---|
attributeNames, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttribute, setAttributeIfAbsent, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.core.AttributeAccessor |
---|
attributeNames, getAttribute, hasAttribute, removeAttribute, setAttribute |
Constructor Detail |
---|
public RepeatContextSupport(RepeatContext parent)
RepeatContextSupport
. The parent can be null, but
should be set to the enclosing repeat context if there is one, e.g. if
this context is an inner loop.
parent
- Method Detail |
---|
public boolean isCompleteOnly()
RepeatContext
isCompleteOnly
in interface RepeatContext
public void setCompleteOnly()
RepeatContext
CompletionPolicy
.
setCompleteOnly
in interface RepeatContext
public boolean isTerminateOnly()
RepeatContext
isTerminateOnly
in interface RepeatContext
public void setTerminateOnly()
RepeatContext
CompletionPolicy
.
setTerminateOnly
in interface RepeatContext
public RepeatContext getParent()
RepeatContext
getParent
in interface RepeatContext
public void increment()
public int getStartedCount()
RepeatContext
getStartedCount
in interface RepeatContext
public void registerDestructionCallback(String name, Runnable callback)
RepeatContext
Runnable
callback should not
throw any exceptions.
registerDestructionCallback
in interface RepeatContext
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.public void close()
RepeatContext
close
in interface RepeatContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |