@Override
    public synchronized boolean disable() {
        if (State.RUNNING == this.state) {
            stop();
        } else if (State.DISABLED == this.state) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, getFileName() + ": attempt to double destroy");
            }
            return false;
        }
        // safe to close the file now
        try {
            this.myChannel.close();
        } catch (IOException ioe) {
            FFDCFilter.processException(ioe, getClass().getName() + ".disable", "124", this);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, getFileName() + ": Failed to close the output file; " + ioe);
            }
        }
        this.state = State.DISABLED;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, getFileName() + ": disabled");
        }
        return true;
    }
@ Override public synchronized boolean disable ( ) { if ( State . RUNNING == this . state ) { stop ( ) ; } else if ( State . DISABLED == this . state ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , getFileName ( ) + ": attempt to double destroy" ) ; } return false ; } try { this . myChannel . close ( ) ; } catch ( IOException ioe ) { FFDCFilter . processException ( ioe , getClass ( ) . getName ( ) + ".disable" , "124" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , getFileName ( ) + ": Failed to close the output file; " + ioe ) ; } } this . state = State . DISABLED ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , getFileName ( ) + ": disabled" ) ; } return true ; }
@see LogFile#disable()