Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the AsyncRequestQueue class.
 /// </summary>
 /// <param name="requestLimit">Request limit.</param>
 /// <param name="overflowAction">The overflow action.</param>
 /// <param name="discardLogMessage">The interface for call when discard log message or null for default.</param>
 public AsyncRequestQueue(int requestLimit,
                          AsyncTargetWrapperOverflowAction overflowAction,
                          IDiscardLogMessage discardLogMessage)
 {
     RequestLimit      = requestLimit;
     OnOverflow        = overflowAction;
     DiscardLogMessage = discardLogMessage;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncTargetWrapper" /> class.
 /// </summary>
 /// <param name="wrappedTarget">The wrapped target.</param>
 /// <param name="queueLimit">Maximum number of requests in the queue.</param>
 /// <param name="overflowAction">The action to be taken when the queue overflows.</param>
 /// <param name="discardLogMessage">The interface for call when discard log message or null for default.</param>
 public AsyncTargetWrapper(Target wrappedTarget, int queueLimit, AsyncTargetWrapperOverflowAction overflowAction, IDiscardLogMessage discardLogMessage)
 {
     RequestQueue              = new AsyncRequestQueue(10000, AsyncTargetWrapperOverflowAction.Discard, discardLogMessage);
     DiscardLogMessage         = discardLogMessage;
     TimeToSleepBetweenBatches = 50;
     BatchSize = 200;
     FullBatchSizeWriteLimit = 5;
     WrappedTarget           = wrappedTarget;
     QueueLimit     = queueLimit;
     OverflowAction = overflowAction;
 }