OpenPetra
Free Administration Software for Non-Profits
|
Helper Class for dealing with 'server busy' state (which can occur due to the prevention of multi-threading DB access problems). More...
Static Public Member Functions | |
static void | CoordinatedAutoRetryCall (string AContext, ref bool AServerCallSuccessful, Action AEncapsulatedServerCallCode, bool AWhenNotSuccessfulThrowSpecialException=false, string AExceptionMessage=null) |
Automatic Retry Handling for Co-ordinated DB Access: Calls the C# Delegate that encapsulates C# code that should be run inside the automatic retry handling scope that this Method provides. It does this a number of times in case the first call didn't work out, and once a set number of retries has been tried it returns (optionally, an Exception can be thrown if the number of retries was exceeded - this gets enabled by setting AWhenNotSuccessfulThrowSpecialException to 'true'). More... | |
Static Public Attributes | |
static readonly string | StrPleaseWaitAFewSecondsManualRetryRequiredGeneric |
todoComment More... | |
static readonly string | StrPleaseWaitAFewSecondsManualRetryRequiredCustom |
todoComment More... | |
Helper Class for dealing with 'server busy' state (which can occur due to the prevention of multi-threading DB access problems).
Another Class, TServerBusyHelperGui in Namespace Ict.Petra.Client.App.Core, derives from this Class and extends it with GUI components related to the 'server-busy'-state.
|
inlinestatic |
Automatic Retry Handling for Co-ordinated DB Access: Calls the C# Delegate that encapsulates C# code that should be run inside the automatic retry handling scope that this Method provides. It does this a number of times in case the first call didn't work out, and once a set number of retries has been tried it returns (optionally, an Exception can be thrown if the number of retries was exceeded - this gets enabled by setting AWhenNotSuccessfulThrowSpecialException to 'true').
AContext | Context that the Method gets called in, eg. name of screen (used only for logging, so don't Catalog.GetString it). |
AServerCallSuccessful | Controls whether a retry (when false) or no retry (when true) gets performed. |
AEncapsulatedServerCallCode | C# Delegate that encapsulates C# code that should be run inside the automatic server call retry handling scope that this Method provides. |
AWhenNotSuccessfulThrowSpecialException | Whether EDBAutoServerCallRetriesExceededException should be thrown when the maximum number of retries has been exceeded, or not (Default=false). Should only be set to true in specific circumstances - the caller should normally just inspect its Variable that gets passed in into AServerCallSuccessful to evaluate whether the call to this Method was within the retry attempts, or not. |
AExceptionMessage | Optional message that the an EDBAutoServerCallRetriesExceededException Exception gets raised with. (Default = ""). |
|
static |
todoComment
|
static |
todoComment