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

io.quarkus.redis.datasource.stream.XGroupSetIdArgs 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 XGroupSetIdArgs entriesRead(long id) {
        this.entriesRead = id;
        return this;
    }

    @Override
    public List toArgs() {
        List args = new ArrayList<>();
        if (entriesRead > 0) {
            args.add("ENTRIESREAD");
            args.add(Long.toString(entriesRead));
        }

        return args;
    }
}