Versions Compared

Key

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

...

Code Block
public class WindowKeyQuery<K, V> implements Query<V>Query<WindowStoreIterator<V>> {

    private final K key;
    private final Optional<Long>Optional<Instant> windowLower;
    private final Optional<Instant> windowUpper;

    private WindowKeyQuery(final K key, final Optional<Long>Optional<Instant> windowLower, final Optional<Instant> windowUpper) {
        this.key = key;
        this.windowLower = windowLower;
        this.windowUpper = windowUpper;
    }

    public static <K, V> WindowKeyQuery<K, V> withKey(final K key) {
        return new WindowKeyQuery<>(key, Optional.empty(), Optional.empty());
    }

    public static <K, V> WindowKeyQuery<K, V> withKeyAndWindowLowerBoundwithKeyAndWindowBounds(final K key, final long timeInstant windowLower, final Instant windowUpper) {
        return new WindowKeyQuery<>(key, Optional.of(windowLower), Optional.of(timewindowUpper));
    }

    public K getKey() {
        return key;
    }

    public Optional<Long>Optional<Instant> getWindowLowergetWindowLowerBound() {
        return windowLower;
    }

    public Optional<Instant> getWindowUpperBound() {
        return windowUpper;
    }
}

The WindowRangeQuery class:

...