public void setTimeout ( int value ) { if ( value == - 1 ) put ( TIMEOUT , "" ) ; //$NON-NLS-1$ else put ( TIMEOUT , ( value == - 2 ) ? DEPTH_INFINITY : "Second-" + Integer . toString ( value ) ) ; //$NON-NLS-1$ }
Set the lock timeout value in seconds . Pass - 1 to clear the value pass - 2 to set Infinity . Set the integer value for the TIMEOUT key .