All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kolibrifx.plovercrest.server.internal.streams.TableStreamWriter Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
 */

package com.kolibrifx.plovercrest.server.internal.streams;

import java.nio.ByteBuffer;
import com.kolibrifx.plovercrest.server.TableWriter;
import com.kolibrifx.plovercrest.server.streams.StreamWriter;

public class TableStreamWriter implements StreamWriter {
    private final TableWriter tableWriter;

    public TableStreamWriter(final TableWriter tableWriter) {
        this.tableWriter = tableWriter;
    }

    @Override
    public void write(final long timestamp, final ByteBuffer buffer) {
        tableWriter.write(timestamp, buffer);
    }

    @Override
    public void freeze() {
        tableWriter.freeze();
    }

    @Override
    public void unfreeze() {
        tableWriter.unfreeze();
    }

    @Override
    public boolean isFrozen() {
        return tableWriter.isFrozen();
    }

    @Override
    public void flush() {
        tableWriter.force();
    }

    @Override
    public void updateLastValidTimestamp(final long timestamp) {
        tableWriter.updateLastValidTimestamp(timestamp);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy