All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Alachisoft.NCache.Common.Util.DebugAnalysis Maven / Gradle / Ivy

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Alachisoft.NCache.Common.Util;

import Alachisoft.NCache.Common.BridgeServicePropValues;

/**
 * @author Basit Anwer
 */
public class DebugAnalysis {
    private static int _debugWanDelay = 1; // millseconds;

    public static int getWanDelay(String cacheName) {
        String wanAppValue = BridgeServicePropValues.getJvBRIDGE_WAN_DELAY(cacheName);
        if (wanAppValue != null && !wanAppValue.isEmpty()) {
            _debugWanDelay = Integer.parseInt(wanAppValue);
            if (_debugWanDelay > 1000) {
                _debugWanDelay = 1000;
                return _debugWanDelay;
            } else {
                return _debugWanDelay;
            }
        }
        return _debugWanDelay;
    }

    public static boolean getEnableDetailLogging() {
        return Boolean.parseBoolean(BridgeServicePropValues.getJvBRIDGE_ENABLE_DEBUG_LOG());
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy