protected static long obtainLongConfigParameter ( MessageStoreImpl msi , String parameterName , String defaultValue , long minValue , long maxValue ) { long value = Long . parseLong ( defaultValue ) ; if ( msi != null ) { String strValue = msi . getProperty ( parameterName , defaultValue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , parameterName + "=" + strValue ) ; } ; // end if try { value = Long . parseLong ( strValue ) ; if ( ( value < minValue ) || ( value > maxValue ) ) { value = Long . parseLong ( defaultValue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "OVERRIDE: " + parameterName + "=" + strValue ) ; } ; // end if } ; // end if } catch ( NumberFormatException nfexc ) { //No FFDC Code Needed. } } ; // end if return value ; }
Obtains the value of a long integer configuration parameter given its name the default value and reasonable minimum and maximum values .