public int getTimeout ( ) { String timeoutString = get ( TIMEOUT ) ; if ( timeoutString == null ) return - 1 ; if ( timeoutString . equalsIgnoreCase ( DEPTH_INFINITY ) ) return - 2 ; if ( timeoutString . regionMatches ( true , 1 , "Second-" , 1 , 7 ) ) //$NON-NLS-1$ return Integer . parseInt ( timeoutString . substring ( 7 ) ) ; // ignore all other cases, and use infinite timeout return - 2 ; }
Get the lock timeout value . The value - 1 means that the value was not set the value - 2 means that the value was Infinity . Return the integer value for the TIMEOUT key .