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

io.descoped.rawdata.discard.DiscardingRawdataProducer Maven / Gradle / Ivy

The newest version!
package io.descoped.rawdata.discard;

import io.descoped.rawdata.api.RawdataMessage;
import io.descoped.rawdata.api.RawdataProducer;

import java.util.concurrent.CompletableFuture;

class DiscardingRawdataProducer implements RawdataProducer {

    final String topic;

    DiscardingRawdataProducer(String topic) {
        this.topic = topic;
    }

    @Override
    public String topic() {
        return topic;
    }

    @Override
    public void publish(RawdataMessage... messages) {
    }

    static final CompletableFuture COMPLETED = CompletableFuture.completedFuture(null);

    @Override
    public CompletableFuture publishAsync(RawdataMessage... messages) {
        return COMPLETED;
    }

    @Override
    public boolean isClosed() {
        return false;
    }

    @Override
    public void close() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy