Code example for ScheduledFuture

Methods: cancel

    private ScheduledFuture<Object> mFlushFuture;
    private void removeAnyScheduledFlush() { 
        if (mFlushFuture != null) {
            mFlushFuture = null;
    private void scheduleFlush() { 
        mFlushFuture = mExecutor.schedule(mFlushCallable, FLUSH_DELAY_IN_MS, TimeUnit.MILLISECONDS);
     * Queues up {@code logUnit} to be published in the background. 
     * @param logUnit the {@link LogUnit} to be published 
     * @param canIncludePrivateData whether private data in the LogUnit should be included 
Connect your IDE to all the code out there  Get Codota for Java