/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before the window function. * * @param windowSize The amount of time for which to keep elements. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize) { return new TimeEvictor<>(windowSize.toMilliseconds()); }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before/after the window function based on the value of doEvictAfter. * * @param windowSize The amount of time for which to keep elements. * @param doEvictAfter Whether eviction is done after window function. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize, boolean doEvictAfter) { return new TimeEvictor<>(windowSize.toMilliseconds(), doEvictAfter); } }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before/after the window function based on the value of doEvictAfter. * * @param windowSize The amount of time for which to keep elements. * @param doEvictAfter Whether eviction is done after window function. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize, boolean doEvictAfter) { return new TimeEvictor<>(windowSize.toMilliseconds(), doEvictAfter); } }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before the window function. * * @param windowSize The amount of time for which to keep elements. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize) { return new TimeEvictor<>(windowSize.toMilliseconds()); }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before the window function. * * @param windowSize The amount of time for which to keep elements. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize) { return new TimeEvictor<>(windowSize.toMilliseconds()); }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before the window function. * * @param windowSize The amount of time for which to keep elements. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize) { return new TimeEvictor<>(windowSize.toMilliseconds()); }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before/after the window function based on the value of doEvictAfter. * * @param windowSize The amount of time for which to keep elements. * @param doEvictAfter Whether eviction is done after window function. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize, boolean doEvictAfter) { return new TimeEvictor<>(windowSize.toMilliseconds(), doEvictAfter); } }
/** * Creates a {@code TimeEvictor} that keeps the given number of elements. * Eviction is done before/after the window function based on the value of doEvictAfter. * * @param windowSize The amount of time for which to keep elements. * @param doEvictAfter Whether eviction is done after window function. */ public static <W extends Window> TimeEvictor<W> of(Time windowSize, boolean doEvictAfter) { return new TimeEvictor<>(windowSize.toMilliseconds(), doEvictAfter); } }