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 
Stop searching for code, let great code find you!  Add Codota to your java IDE