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

io.quarkus.redis.datasource.stream.XGroupCreateArgs Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.redis.datasource.stream;

import java.util.ArrayList;
import java.util.List;

import io.quarkus.redis.datasource.RedisCommandExtraArguments;

/**
 * Represents the extra argument of the 
     * Requires REdis 7.0.0+
     *
     * @param id the arbitrary id
     * @return the current {@code XGroupCreateArgs}
     */
    public XGroupCreateArgs entriesRead(String id) {
        this.entriesRead = id;
        return this;
    }

    @Override
    public List toArgs() {
        List args = new ArrayList<>();
        if (mkstream) {
            args.add("MKSTREAM");
        }
        if (entriesRead != null) {
            args.add("ENTRIESREAD");
            args.add(entriesRead);
        }

        return args;
    }
}