Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager Class Reference

Global variable support for repeat clients. Normally it is not necessary for clients to be aware of the surrounding environment because a IRepeatCallback can always use the context it is passed by the enclosing IRepeatOperations. But occasionally it might be helpful to have lower level access to the ongoing IRepeatContext so we provide a global accessor here. The mutator methods (Clear() and Register(IRepeatContext) should not be used except internally by IRepeatOperations implementations. More...

Static Public Member Functions

static IRepeatContext GetContext ()
 Getter for the current context. A context is shared by all items in the batch, so this method is intended to return the same context object independent of whether the callback is running synchronously or asynchronously with the surrounding IRepeatOperations. More...
 
static void SetCompleteOnly ()
 Convenience method to set the current repeat operation to complete if it exists. More...
 
static IRepeatContext Register (IRepeatContext context)
 Method for registering a context - should only be used by IRepeatOperations implementations to ensure that GetContext() always returns the correct value. More...
 
static IRepeatContext Clear ()
 Clear the current context at the end of a batch - should only be used by IRepeatOperations implementations. More...
 
static void SetAncestorsCompleteOnly ()
 Set current session and all ancestors (via parent) to complete., More...
 

Detailed Description

Global variable support for repeat clients. Normally it is not necessary for clients to be aware of the surrounding environment because a IRepeatCallback can always use the context it is passed by the enclosing IRepeatOperations. But occasionally it might be helpful to have lower level access to the ongoing IRepeatContext so we provide a global accessor here. The mutator methods (Clear() and Register(IRepeatContext) should not be used except internally by IRepeatOperations implementations.

Member Function Documentation

static IRepeatContext Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager.Clear ( )
static

Clear the current context at the end of a batch - should only be used by IRepeatOperations implementations.

Returns
the old value if there was one.
static IRepeatContext Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager.GetContext ( )
static

Getter for the current context. A context is shared by all items in the batch, so this method is intended to return the same context object independent of whether the callback is running synchronously or asynchronously with the surrounding IRepeatOperations.

Returns
the current IRepeatContext or null if there is none (if we are not in a batch).
static IRepeatContext Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager.Register ( IRepeatContext  context)
static

Method for registering a context - should only be used by IRepeatOperations implementations to ensure that GetContext() always returns the correct value.

Parameters
contexta new context at the start of a batch.
Returns
the old value if there was one.
static void Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager.SetAncestorsCompleteOnly ( )
static

Set current session and all ancestors (via parent) to complete.,

static void Summer.Batch.Infrastructure.Repeat.Support.RepeatSynchronizationManager.SetCompleteOnly ( )
static

Convenience method to set the current repeat operation to complete if it exists.


The documentation for this class was generated from the following file:
  • Summer.Batch.Infrastructure/Repeat/Support/RepeatSynchronizationManager.cs