@Nullable
    public static TtlTimerTask get(@Nullable TimerTask timerTask, boolean releaseTtlValueReferenceAfterRun, boolean idempotent) {
        if (null == timerTask) return null;

        if (timerTask instanceof TtlEnhanced) {
            // avoid redundant decoration, and ensure idempotency
            if (idempotent) return (TtlTimerTask) timerTask;
            else throw new IllegalStateException("Already TtlTimerTask!");
        }
        return new TtlTimerTask(timerTask, releaseTtlValueReferenceAfterRun);
    }
@ Nullable public static TtlTimerTask get ( @ Nullable TimerTask timerTask , boolean releaseTtlValueReferenceAfterRun , boolean idempotent ) { if ( null == timerTask ) return null ; if ( timerTask instanceof TtlEnhanced ) { if ( idempotent ) return ( TtlTimerTask ) timerTask ; else throw new IllegalStateException ( "Already TtlTimerTask!" ) ; } return new TtlTimerTask ( timerTask , releaseTtlValueReferenceAfterRun ) ; }
Factory method, wrap input {@link TimerTask} to {@link TtlTimerTask}.
<p>
This method is idempotent.

@param timerTask                        input {@link TimerTask}
@param releaseTtlValueReferenceAfterRun release TTL value reference after run, avoid memory leak even if {@link TtlTimerTask} is referred.
@param idempotent                       is idempotent or not. {@code true} will cover up bugs! <b>DO NOT</b> set, only when you know why.
@return Wrapped {@link TimerTask}