Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext > Class Template Referenceabstract

Central convenience class for framework use in managing the scope context. More...

Inheritance diagram for Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >:

Public Member Functions

TContext GetContext ()
 Getter for the current context if there is one, otherwise returns null. More...
 
TContext Register (TExecution execution)
 Register a context with the current thread - always put a matching Close() call in a finally block to ensure that the correct context is available in the enclosing block. More...
 
void Close ()
 Method for unregistering the current context - should always and only be used by in conjunction with a matching Register(TExecution) to ensure that GetContext always returns the correct value. Does not call close on the context - that is left up to the caller because he has a reference to the context (having registered it) and only he has knowledge of when the execution actually ended. More...
 
void Increment ()
 Increment execution counter. More...
 
void Release ()
 A convenient "deep" close operation. Call this instead of Close() if the execution for the current context is ending. Delegates to Close(TContext) and then ensures that Close() is also called in a finally block. More...
 
void Dispose ()
 IDisposable::Dispose More...
 

Protected Member Functions

abstract void Close (TContext context)
 To be overriden by subclasses. More...
 
abstract TContext CreateNewContext (TExecution execution)
 To be overriden by subclasses. More...
 
virtual void Dispose (bool disposing)
 Effective dispose More...
 

Detailed Description

Central convenience class for framework use in managing the scope context.

Template Parameters
TExecution the type of the execution
TContext the type of the stored context
Type Constraints
TContext :class 
TExecution :class 

Member Function Documentation

void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Close ( )

Method for unregistering the current context - should always and only be used by in conjunction with a matching Register(TExecution) to ensure that GetContext always returns the correct value. Does not call close on the context - that is left up to the caller because he has a reference to the context (having registered it) and only he has knowledge of when the execution actually ended.

abstract void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Close ( TContext  context)
protectedpure virtual

To be overriden by subclasses.

Parameters
context
abstract TContext Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.CreateNewContext ( TExecution  execution)
protectedpure virtual

To be overriden by subclasses.

Parameters
execution
Returns
void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Dispose ( )

IDisposable::Dispose

virtual void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Dispose ( bool  disposing)
protectedvirtual

Effective dispose

Parameters
disposing
TContext Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.GetContext ( )

Getter for the current context if there is one, otherwise returns null.

Returns
the current context or null if there is none (if one has not been registered for this thread)
void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Increment ( )

Increment execution counter.

TContext Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Register ( TExecution  execution)

Register a context with the current thread - always put a matching Close() call in a finally block to ensure that the correct context is available in the enclosing block.

Parameters
execution
Returns
void Summer.Batch.Core.Scope.Context.SynchronizationManagerSupport< TExecution, TContext >.Release ( )

A convenient "deep" close operation. Call this instead of Close() if the execution for the current context is ending. Delegates to Close(TContext) and then ensures that Close() is also called in a finally block.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/Scope/Context/SynchronizationManagerSupport.cs