
io.lettuce.core.dynamic.BatchTasks Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lettuce-core Show documentation
Show all versions of lettuce-core Show documentation
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