Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
firstline0
titlePublic API changes
Windows {
	//Existing methods.
	public Windows<W> until(final long durationMs) throws IllegalArgumentException;
	public long maintainMs();
	public abstract long size();

	//New methods.
	public Windows<W> until(final Duration duration) throws IllegalArgumentException;
	public Duration maintain();
	public abstract Duration size();
}


class Window {
	//Existing methods.
	public Window(final long startMs, final long endMs) throws IllegalArgumentException;
	public long start();
	public long end();


	//New methods.
	public Window(final LocalDateTime start, final LocalDateTime end) throws IllegalArgumentException;
	public LocalDateTime start();
	public LocalDateTime end();
}


JoinWindows {
    //Existing methods.
    public static JoinWindows of(final long timeDifferenceMs) throws IllegalArgumentException;
    public JoinWindows before(final long timeDifferenceMs) throws IllegalArgumentException;
    public JoinWindows after(final long timeDifferenceMs) throws IllegalArgumentException;
    public JoinWindows until(final long durationMs) throws IllegalArgumentException;
    public long maintainMs();

    //New methods.
    public static JoinWindows of(final Duration timeDifference) throws IllegalArgumentException;
    public JoinWindows before(final Duration timeDifference) throws IllegalArgumentException;
    public JoinWindows after(final Duration timeDifference) throws IllegalArgumentException;
    public JoinWindows until(final Duration duration) throws IllegalArgumentException;
    public Duration maintain();
}

SessionWindows {
	//Existing methods.
    public static SessionWindows with(final long inactivityGapMs);
    public SessionWindows until(final long durationMs) throws IllegalArgumentException;
    public interface  long inactivityGap();
    public long maintainMs();

	//New methods.
    public static SessionWindows with(final Duration inactivityGap);
    public SessionWindows until(final Duration duration) throws IllegalArgumentException;
    public Duration inactivityGap();
    public Duration maintain();
}

TimeWindowedDeserializer {
	//Existing methods.
	public TimeWindowedDeserializer(final Deserializer<T> inner, final long windowSize);
	public Long getWindowSize();

	//New methods.
	public TimeWindowedDeserializer(final Deserializer<T> inner, final Duration windowSize);
	public Duration getWindowSize();
}

TimeWindows {
	//Existing methods.
	public static TimeWindows of(final long sizeMs) throws IllegalArgumentException;
	public TimeWindows advanceBy(final long advanceMs);
	public Map<Long, TimeWindow> windowsFor(final long timestamp);
    public long size();
    public TimeWindows until(final long durationMs) throws IllegalArgumentException;
    public long maintainMs();

	//New methods.
	public static TimeWindows of(final Duration size) throws IllegalArgumentException;
	public TimeWindows advanceBy(final Duration advance);
	public Map<Long, TimeWindow> windowsFor(LocalDateTime timestamp);
    public Duration size();
    public TimeWindows until(final Duration duration) throws IllegalArgumentException;
    public Duration maintain();
}



UnlimitedWindows {
	//Existing methods.
    public UnlimitedWindows startOn(final long startMs) throws IllegalArgumentException;
    public Map<Long, UnlimitedWindow> windowsFor(final long timestamp);
	public long size();
	public long maintainMs();


	//New methods.
    public UnlimitedWindows startOn(final LocalDateTime start) throws IllegalArgumentException;
    public Map<Long, UnlimitedWindow> windowsFor(final LocalDateTime timestamp);
	public Duration size();
	public Duration maintain();
}


ProcessorContext {
    //Existing method.
    Cancellable schedule(final long intervalMs,
                         final PunctuationType type,
                         final Punctuator callback);


	//New method.
    Cancellable schedule(final Duration interval,
                         final PunctuationType type,
                         final Punctuator callback);
}


ReadOnlyWindowStore<K, V> {
    //Existing methods.
    WindowStoreIterator<V> fetch(K key, long timeFrom, long timeTo);

    KeyValueIterator<Windowed<K>, V> fetch(K from, K to, long timeFrom, long timeTo);

    KeyValueIterator<Windowed<K>, V> fetchAll(long timeFrom, long timeTo);


	//New methods.
    WindowStoreIterator<V> fetch(K key, LocalDateTime from, Duration duration);

    KeyValueIterator<Windowed<K>, V> fetch(K from, K to, LocalDateTime from, Duration duration);

    KeyValueIterator<Windowed<K>, V> fetchAll(LocalDateTime from, Duration duration);
}


SessionBytesStoreSupplier {
    //Existing methods.
    long segmentIntervalMs();

    long retentionPeriod();


    //New methods.
    Duration segmentInterval();

    Duration retentionPeriod();

}


WindowBytesStoreSupplierSessionStore {
    	//Existing methods.
	KeyValueIterator<Windowed<K>, AGG> findSessions(final K key, long segmentIntervalMs(earliestSessionEndTime, final long latestSessionStartTime);

	KeyValueIterator<Windowed<K>, AGG> findSessions(final  long windowSize();

   K keyFrom, final K keyTo, long earliestSessionEndTime, final long retentionPeriod(latestSessionStartTime);


	//New methods.
	KeyValueIterator<Windowed<K>, AGG> findSessions(final K key, LocalDateTime earliestSessionEnd, Duration segmentInterval(final LocalDateTime latestSessionStart);

    Duration windowSize();

    Duration retentionPeriod(	KeyValueIterator<Windowed<K>, AGG> findSessions(final K keyFrom, final K keyTo, LocalDateTime earliestSessionEndTime, final LocalDateTime latestSessionStartTime);
}


JoinWindowsStores {
    	//Existing methods.
	public static WindowBytesStoreSupplier persistentWindowStore(final String name,
    	                                        public static JoinWindows of(final long timeDifferenceMs) throws IllegalArgumentException;


                 final long retentionPeriod,
        	                               public JoinWindows before(final long timeDifferenceMs) throws IllegalArgumentException;

    public JoinWindows after(final long timeDifferenceMs) throws IllegalArgumentException;


    public JoinWindows until(final long durationMs) throws IllegalArgumentException;


windowSize,
         public long maintainMs();


 	   //New methods.
    public static JoinWindows of(final Duration timeDifference) throws IllegalArgumentException;

    public JoinWindows before(final Duration timeDifference) throws IllegalArgumentException;

    public JoinWindows after(final Duration timeDifference) throws IllegalArgumentException;

    public JoinWindows until(final Duration duration) throws IllegalArgumentException;

    publicfinal Durationboolean maintain(retainDuplicates);
}


SessionWindows {
	//Existing methods.
	public static WindowBytesStoreSupplier persistentWindowStore(final String name,
    	                                                      public static SessionWindows with(final long inactivityGapMs);


retentionPeriod,
        	                                                   public SessionWindows until(final long durationMs) throws IllegalArgumentException;


    public long inactivityGap();


    public long maintainMs(windowSize,
            	                                                 final boolean retainDuplicates,
                	                                             final long segmentInterval);


	public static SessionBytesStoreSupplier persistentSessionStore(final String name,
    	                                                           final long retentionPeriod);


	//New methods.
	public static WindowBytesStoreSupplier persistentWindowStore(final String name,
    	                               public static SessionWindows with(                          final Duration inactivityGap);

    public SessionWindows until(final Duration duration) throws IllegalArgumentException;

    public Duration inactivityGap();

    public Duration maintain();
}


TimeWindows {
	//Exising methods.
	public static TimeWindows of(final long sizeMs) throws IllegalArgumentException;


	public TimeWindows advanceBy(final long advanceMs);


	public Map<Long, TimeWindow> windowsFor(final long timestamp);


    public long size();


    public TimeWindows until(final long durationMs) throws IllegalArgumentException;


    public long maintainMs();


	//New methods.
	public static TimeWindows of(final Duration size) throws IllegalArgumentException;

	public TimeWindows advanceBy(final Duration advance);

	public Map<Long, TimeWindow> windowsFor(LocalDateTime timestamp);


    public Duration size();

    public TimeWindows until(final Duration duration) throws IllegalArgumentException;

    public Duration maintainretentionPeriod,
        	                                                     final long windowSize,
            	                                                 final boolean retainDuplicates);



	public static WindowBytesStoreSupplier persistentWindowStore(final String name,
    	                                                         final Duration retentionPeriod,
        	                                                     final long windowSize,
            	                                                 final boolean retainDuplicates,
                	                                             final long segmentInterval);



	public static SessionBytesStoreSupplier persistentSessionStore(final String name,
    	                                                           final Duration retentionPeriod);
}

WindowBytesStoreSupplier {
    //Existing methods.
    long segmentIntervalMs();
    long windowSize();
    long retentionPeriod();


	//New methods.
    Duration segmentInterval();
    Duration windowSize();
    Duration retentionPeriod();
}


WindowsKafkaStreams {
	//Existing methodsmethod.
	public Windows<W>synchronized boolean untilclose(final long durationMs) throws IllegalArgumentExceptiontimeout, final TimeUnit timeUnit);


	//New method
	public longsynchronized boolean maintainMsclose();


	public abstract long size(final Duration timeout)
}


StreamsMetrics {
	//Existing method.
	void recordLatency(final Sensor sensor,
    	               final long startNs,
        	           final long endNs);


	//New methodsmethod.
	publicvoid Windows<W> untilrecordLatency(final Sensor sensor,
 Duration duration) throws IllegalArgumentException;

	public Duration maintain();

	public abstract Duration size(	               final LocalDateTime start,
        	           final Duration recDuration);
}


Proposed Changes

New methods in public API are proposed. See "Public Interfaces" sesion.

...