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

io.lettuce.core.resource.ConstantDelay 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.resource;

import java.time.Duration;

/**
 * {@link Delay} with a constant delay for each attempt.
 *
 * @author Mark Paluch
 */
class ConstantDelay extends Delay {

    private final Duration delay;

    ConstantDelay(Duration delay) {
        this.delay = delay;
    }

    @Override
    public Duration createDelay(long attempt) {
        return delay;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy