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

io.lettuce.core.dynamic.BatchTasks Maven / Gradle / Ivy

Go to download

Advanced and thread-safe Java Redis client for synchronous, asynchronous, and reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs and much more.

The newest version!
package io.lettuce.core.dynamic;

import java.util.Collections;
import java.util.Iterator;
import java.util.List;

import io.lettuce.core.protocol.RedisCommand;

/**
 * Result of a batching request. Contains references to the batched {@link RedisCommand}s.
 *
 * @author Mark Paluch
 * @since 5.0
 */
class BatchTasks implements Iterable> {

    public static final BatchTasks EMPTY = new BatchTasks(Collections.emptyList());

    private final List> futures;

    BatchTasks(List> futures) {
        this.futures = futures;
    }

    @Override
    public Iterator> iterator() {
        return futures.iterator();
    }

    @SuppressWarnings("rawtypes")
    public RedisCommand[] toArray() {
        return futures.toArray(new RedisCommand[0]);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy