com.kolibrifx.plovercrest.server.streams.SeekableStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
The newest version!
/*
* Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
*/
package com.kolibrifx.plovercrest.server.streams;
/**
* A specialized {@link Stream}, that in addition to {@link #seekPreviousTimestamp(long)} (which all
* streams should support), also support readers that are seekable by timestamp.
*
* This interface should only be implemented if seeking by timestamp can be implemented efficiently.
*/
public interface SeekableStream extends Stream {
@Override
SeekableReader createReaderFromIndex(long index, StreamObserver observer);
@Override
SeekableReader createReaderFromTimestamp(long timestamp, StreamObserver observer);
}