@Override
    public void run() {
        // Check for a pending exception.  A CancellationException could be set if a cancel() was driven while this Runnable
        // was being re-scheduled.
        if (this.m_pendingException != null) {
            return;
        }

        // NOTE: Already running in Default Executor thread.
        try {
            this.m_runnable.run();
        } catch (Exception e) {
            this.m_pendingException = new ExecutionException(e);
            this.m_coordinationLatch.countDown();
            return;
        }

        try {
            long scheduleTime = this.m_periodInterval;
            if (!this.m_scheduledWithDelay) {
                this.m_myNextExecutionTime = this.m_myNextExecutionTime + this.m_periodInterval;
                long currentTime = System.nanoTime();

                scheduleTime = (this.m_myNextExecutionTime > currentTime) ? (this.m_myNextExecutionTime - currentTime) : 0;
            }

            m_schedFuture = this.m_scheduledExecutor.schedule(this, scheduleTime, TimeUnit.NANOSECONDS);
        } catch (Exception e) {
            this.m_pendingException = e;
            this.m_coordinationLatch.countDown();
        }
    }
@ Override public void run ( ) { if ( this . m_pendingException != null ) { return ; } try { this . m_runnable . run ( ) ; } catch ( Exception e ) { this . m_pendingException = new ExecutionException ( e ) ; this . m_coordinationLatch . countDown ( ) ; return ; } try { long scheduleTime = this . m_periodInterval ; if ( ! this . m_scheduledWithDelay ) { this . m_myNextExecutionTime = this . m_myNextExecutionTime + this . m_periodInterval ; long currentTime = System . nanoTime ( ) ; scheduleTime = ( this . m_myNextExecutionTime > currentTime ) ? ( this . m_myNextExecutionTime - currentTime ) : 0 ; } m_schedFuture = this . m_scheduledExecutor . schedule ( this , scheduleTime , TimeUnit . NANOSECONDS ) ; } catch ( Exception e ) { this . m_pendingException = e ; this . m_coordinationLatch . countDown ( ) ; } }
/*
(non-Javadoc)

@see java.lang.Runnable#run()