Skip to content

Commit

Permalink
KAFKA-9929: fix: add missing default implementations (apache#9321)
Browse files Browse the repository at this point in the history
Reviewers: A. Sophie Blee-Goldman <[email protected]>, Guozhang Wang <[email protected]>
  • Loading branch information
jeqo authored and Rafa García committed Oct 20, 2020
1 parent f9e1cd0 commit dfc9dcc
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ public interface ReadOnlyWindowStore<K, V> {
* @throws NullPointerException if {@code null} is used for key.
* @throws IllegalArgumentException if duration is negative or can't be represented as {@code long milliseconds}
*/
WindowStoreIterator<V> backwardFetch(K key, Instant timeFrom, Instant timeTo) throws IllegalArgumentException;
default WindowStoreIterator<V> backwardFetch(K key, Instant timeFrom, Instant timeTo) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

/**
* Get all the key-value pairs in the given key range and time range from all the existing windows.
Expand Down Expand Up @@ -206,8 +208,10 @@ KeyValueIterator<Windowed<K>, V> fetch(K keyFrom, K keyTo, Instant timeFrom, Ins
* @throws NullPointerException if {@code null} is used for any key.
* @throws IllegalArgumentException if duration is negative or can't be represented as {@code long milliseconds}
*/
KeyValueIterator<Windowed<K>, V> backwardFetch(K keyFrom, K keyTo, Instant timeFrom, Instant timeTo)
throws IllegalArgumentException;
default KeyValueIterator<Windowed<K>, V> backwardFetch(K keyFrom, K keyTo, Instant timeFrom, Instant timeTo)
throws IllegalArgumentException {
throw new UnsupportedOperationException();
}


/**
Expand Down Expand Up @@ -265,5 +269,7 @@ default KeyValueIterator<Windowed<K>, V> backwardAll() {
* @throws NullPointerException if {@code null} is used for any key
* @throws IllegalArgumentException if duration is negative or can't be represented as {@code long milliseconds}
*/
KeyValueIterator<Windowed<K>, V> backwardFetchAll(Instant timeFrom, Instant timeTo) throws IllegalArgumentException;
default KeyValueIterator<Windowed<K>, V> backwardFetchAll(Instant timeFrom, Instant timeTo) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}
}

0 comments on commit dfc9dcc

Please sign in to comment.