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;
    }
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)) 
            return Integer.parseInt(timeoutString.substring(7));
        
        return -2;
    }
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.

<p>Implements the corresponding API in the interface
<code>Context</code>.</p>

@return the value for TIMEOUT
@see Context#getTimeout()
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 .