Versions Compared

Key

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

...

Code Block
languagejava
firstline1
titleVersionedRecord.java
linenumberstrue
package org.apache.kafka.streams.state;

public final class VersionedRecord<V> {

 	/**
     * Create a new {@link VersionedRecord} instance. {@code value} cannot be {@code null}.
     *
     * @param value      the value
     * @param timestamp  the timestamp
     */
    public VersionedRecord(final V value, final long timestamp) {
        this.value = Objects.requireNonNull(value);
        this.timestamp = timestamp;
        this.validTo = Long.MAX_VALUE;
    }      
	
	/**
     * Create a new {@link VersionedRecord} instance. {@code value} cannot be {@code null}.
     *
     * @param value      theThe value
     * @param timestamp  theThe timestamp
     * @param validTo    the The latestexclusive exclusiveupper timestampbound thatof valuethe isvalidity validinterval
     */
     public VersionedRecord(final V value, final long timestamp, final long validTo);


    /**
     * Returns the {@code validTo} 
     */
     public long validTo();
}

...

Code Block
languagejava
firstline1
titleValueIterator.java
linenumberstrue
package org.apache.kafka.streams.state;

/**
 * Iterator interface of {@link V}.
 * <p>
 * Users must call its {@code close} method explicitly upon completeness to release resources,
 * or use try-with-resources statement (available since JDK7) for this {@link Closeable} class.
 * Note that {@code remove()} is not supported.
 *
 * @param <V> Type of values
 */
public interface ValueIterator<V> extends Iterator<V>, Closeable {

    @Override
    void close();

    /**
     * Peek the next value without advancing the iterator
     * @return theThe value that would be returned from the next call to next{@link #next()}
     */
    V peek();
}

MultiVersionedKeyQuery class

...