Summer.Batch.Infrastructure.Repeat.IRepeatContext Interface Reference

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 IRepeatOperations. Within a batch callback code can communicate via the IAttributeAccessor interface. More...

Inheritance diagram for Summer.Batch.Infrastructure.Repeat.IRepeatContext:
Summer.Batch.Common.Util.IAttributeAccessor Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport Summer.Batch.Infrastructure.Repeat.Policy.SimpleCompletionPolicy.SimpleTerminationContext

Public Member Functions

int GetStartedCount ()
 Public access to a counter for the number of operations attempted. More...
 
void SetCompleteOnly ()
 Signal to the framework that the current batch should complete normally, independent of the current CompletionPolicy More...
 
bool IsCompleteOnly ()
 Public accessor for the complete flag. More...
 
void SetTerminateOnly ()
 Signal to the framework that the current batch should complete abnormally, independent of the current CompletionPolicy. More...
 
bool IsTerminateOnly ()
 Public accessor for the termination flag. If this flag is set then the complete flag will also be. More...
 
void RegisterDestructionCallback (string name, Task callback)
 Register a callback to be executed on close, associated with the attribute having the given name. The ThreadStart callback should not throw any exceptions. More...
 
void Close ()
 Allow resources to be cleared, especially in destruction callbacks. Implementations should ensure that any registered destruction callbacks are executed here, as long as the corresponding attribute is still available. /summary>
 
- Public Member Functions inherited from Summer.Batch.Common.Util.IAttributeAccessor
void SetAttribute (string name, object val)
 Sets the attribute defined by name to the supplied value. If value is null, the attribute is removed. In general, users should take care to prevent overlaps with other metadata attributes by using fully-qualified names, perhaps using class or package names as prefix. More...
 
object GetAttribute (string name)
 Gets the value of the attribute identified by name. Returns null if the attribute doesn't exist. More...
 
object RemoveAttribute (string name)
 Removes the attribute identified by name and return its value. Return null if no attribute under name is found. More...
 
bool HasAttribute (string name)
 Returns true if the attribute identified by name exists. Otherwise return false. More...
 
string[] AttributeNames ()
 Returns the names of all attributes. More...
 

Properties

IRepeatContext Parent [get]
 If batches are nested, then the inner batch will be created with the outer one as a parent. This is an accessor for the parent if it exists. More...
 

Detailed Description

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 IRepeatOperations. Within a batch callback code can communicate via the IAttributeAccessor interface.

Member Function Documentation

int Summer.Batch.Infrastructure.Repeat.IRepeatContext.GetStartedCount ( )

Public access to a counter for the number of operations attempted.

Returns
the number of batch operations started.

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

bool Summer.Batch.Infrastructure.Repeat.IRepeatContext.IsCompleteOnly ( )

Public accessor for the complete flag.

Returns

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

bool Summer.Batch.Infrastructure.Repeat.IRepeatContext.IsTerminateOnly ( )

Public accessor for the termination flag. If this flag is set then the complete flag will also be.

Returns

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

void Summer.Batch.Infrastructure.Repeat.IRepeatContext.RegisterDestructionCallback ( string  name,
Task  callback 
)

Register a callback to be executed on close, associated with the attribute having the given name. The ThreadStart callback should not throw any exceptions.

Parameters
namethe name of the attribute to associated this callback with. If this attribute is removed the callback should never be called.
callbacka Task to execute when the context is closed.

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

void Summer.Batch.Infrastructure.Repeat.IRepeatContext.SetCompleteOnly ( )

Signal to the framework that the current batch should complete normally, independent of the current CompletionPolicy

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

void Summer.Batch.Infrastructure.Repeat.IRepeatContext.SetTerminateOnly ( )

Signal to the framework that the current batch should complete abnormally, independent of the current CompletionPolicy.

Implemented in Summer.Batch.Infrastructure.Repeat.Context.RepeatContextSupport.

Property Documentation

IRepeatContext Summer.Batch.Infrastructure.Repeat.IRepeatContext.Parent
get

If batches are nested, then the inner batch will be created with the outer one as a parent. This is an accessor for the parent if it exists.

Returns
the parent context or null if there is none

The documentation for this interface was generated from the following file:
  • Summer.Batch.Infrastructure/Repeat/IRepeatContext.cs