package com.cameleer.server.app.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Configuration properties for the ingestion write buffer.
 * Bound from the {@code cameleer.server.ingestion.*} namespace in application.yml.
 * <p>
 * Registered via {@code @EnableConfigurationProperties} on the application class.
 */
@ConfigurationProperties(prefix = "cameleer.server.ingestion")
public class IngestionConfig {

    private int bufferCapacity = 50_000;
    private int batchSize = 100;
    private long flushIntervalMs = 1_000;

    public int getBufferCapacity() {
        return bufferCapacity;
    }

    public void setBufferCapacity(int bufferCapacity) {
        this.bufferCapacity = bufferCapacity;
    }

    public int getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(int batchSize) {
        this.batchSize = batchSize;
    }

    public long getFlushIntervalMs() {
        return flushIntervalMs;
    }

    public void setFlushIntervalMs(long flushIntervalMs) {
        this.flushIntervalMs = flushIntervalMs;
    }
}
