C# Class Spring.Retry.Retry.Support.RetrySynchronizationManager

Global variable support for retry clients. Normally it is not necessary for clients to be aware of the surrounding environment because a IRetryCallback{T} can always use the context it is passed by the enclosing IRetryOperations{T}. But occasionally it might be helpful to have lower level access to the ongoing IRetryContext so we provide a global accessor here. The mutator methods ({@link #clear()} and
ファイルを表示 Open project: spring-projects/spring-net-retry Class Usage Examples

Public Methods

Method Description
Clear ( ) : IRetryContext

Clear the current context at the end of a batch - should only be used by IRetryOperations{T} implementations.

GetContext ( ) : IRetryContext

Public accessor for the locally enclosing IRetryContext.

Register ( IRetryContext context ) : IRetryContext

Method for registering a context - should only be used by IRetryOperations{T} implementations to ensure that GetContext always returns the correct value.

Private Methods

Method Description
RetrySynchronizationManager ( ) : System.Threading

Method Details

Clear() public static method

Clear the current context at the end of a batch - should only be used by IRetryOperations{T} implementations.
public static Clear ( ) : IRetryContext
return IRetryContext

GetContext() public static method

Public accessor for the locally enclosing IRetryContext.
public static GetContext ( ) : IRetryContext
return IRetryContext

Register() public static method

Method for registering a context - should only be used by IRetryOperations{T} implementations to ensure that GetContext always returns the correct value.
public static Register ( IRetryContext context ) : IRetryContext
context IRetryContext The new context to register.
return IRetryContext