|
24 | 24 | */
|
25 | 25 | public class VersionedCodecStreamWrapper<T> {
|
26 | 26 | // TODO This can be updated to hold a streamReadWriteHandlerFactory and get relevant handler based on the stream versions
|
27 |
| - private final StreamReadWriteHandler<T> streamReadWriteHandler; |
| 27 | + private final IndexIOStreamHandler<T> indexIOStreamHandler; |
28 | 28 | private final int currentVersion;
|
29 | 29 | private final String codec;
|
30 | 30 |
|
31 | 31 | /**
|
32 |
| - * @param streamReadWriteHandler handler to read/write stream from T |
| 32 | + * @param indexIOStreamHandler handler to read/write stream from T |
33 | 33 | * @param currentVersion latest supported version of the stream
|
34 | 34 | * @param codec: stream codec
|
35 | 35 | */
|
36 |
| - public VersionedCodecStreamWrapper(StreamReadWriteHandler<T> streamReadWriteHandler, int currentVersion, String codec) { |
37 |
| - this.streamReadWriteHandler = streamReadWriteHandler; |
| 36 | + public VersionedCodecStreamWrapper(IndexIOStreamHandler<T> indexIOStreamHandler, int currentVersion, String codec) { |
| 37 | + this.indexIOStreamHandler = indexIOStreamHandler; |
38 | 38 | this.currentVersion = currentVersion;
|
39 | 39 | this.codec = codec;
|
40 | 40 | }
|
@@ -104,9 +104,9 @@ private void writeFooter(IndexOutput indexOutput) throws IOException {
|
104 | 104 | * Returns relevant handler for the version
|
105 | 105 | * @param version stream content version
|
106 | 106 | */
|
107 |
| - private StreamReadWriteHandler<T> getHandlerForVersion(int version) { |
| 107 | + private IndexIOStreamHandler<T> getHandlerForVersion(int version) { |
108 | 108 | // TODO implement factory and pick relevant handler based on version.
|
109 | 109 | // It should also take into account min and max supported versions
|
110 |
| - return this.streamReadWriteHandler; |
| 110 | + return this.indexIOStreamHandler; |
111 | 111 | }
|
112 | 112 | }
|
0 commit comments