public PerformanceStatistics(PerformanceMonitorConfiguration configuration) { _configuration = configuration; ControllerActionStatistics = new ActionStatistics(); RequestStatistics = new DataStatistics(); ResponseStatisticsPreAction = new DataStatistics(); ResponseStatisticsPostAction = new DataStatistics(); ConversionStatistics = new DataStatistics(); DatabaseFlushStatistics = new DataStatistics(); }
public override void stageExecute(SalePostContext context) { ActionStatistics schemeStats = context.getTerminalSchemeStatitics(); AuthScheme scheme = context.saleBuild().AuthScheme; if ((scheme != null) && (schemeStats != null)) { if (terminalStatsCheckUtility.isUnderThreshold(schemeStats, scheme)) { nextStage(context); } else { // Over threshold and approval rate too low - Block the transaction. context.responseBuilder().ResponseCode = ResponseCode.SCHEME_AUTH_LIMIT_REACHED; } } else { // Cannot get stats, can't guarantee won't exceed limits, so have to decline. //Logger.error("Cannot get scheme statistics, or determine scheme - " + "Rejecting transaction"); context.responseBuilder().ResponseCode = ResponseCode.COULD_NOT_CHECK_AUTH_LIMIT; } }
public override void stageExecute(SalePostContext context) { ActionStatistics cardStats = context.getTerminalCardStatistics(); if (cardStats != null) { if (cardTerminalStatsUtility.isUnderThreshold(cardStats)) { // card stats ok, haven't reached the limit, so continue. nextStage(context); } else { // Limit reached... context.responseBuilder().ResponseCode = ResponseCode.CARD_AUTH_LIMIT_REACHED; } } else { // Cannot get stats, can't guarantee won't exceed limits, so have to decline. //Logger.error("Cannot get card statistics - Rejecting transaction"); context.responseBuilder().ResponseCode = ResponseCode.COULD_NOT_CHECK_AUTH_LIMIT; } }
public virtual void setTerminalStatistics(ActionStatistics cardStats, ActionStatistics schemeStats) { terminalCardStats = cardStats; terminalSchemeStats = schemeStats; }
public IQueryable <UserActionDetails> GetActionDetails(string owner) { return(ActionStatistics.Where(statistic => string.Equals(statistic.UserId, owner, System.StringComparison.InvariantCultureIgnoreCase))); }
public virtual bool isUnderThreshold(ActionStatistics cardStats) { throw new NotImplementedException(); }
public virtual bool isUnderThreshold(ActionStatistics schemeStats, AuthScheme scheme) { throw new NotImplementedException(); }