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

io.lettuce.core.dynamic.CommandMethodVerifier 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 io.lettuce.core.dynamic.segment.CommandSegments;

/**
 * Verifies {@link CommandMethod} declarations by checking available Redis commands.
 *
 * @author Mark Paluch
 * @since 5.0
 */
@FunctionalInterface
interface CommandMethodVerifier {

    /**
     * Default instance that does not verify commands.
     */
    CommandMethodVerifier NONE = (commandSegments, commandMethod) -> {
    };

    /**
     * Verify a {@link CommandMethod} with its {@link CommandSegments}. This method verifies that the command exists and that
     * the required number of arguments is declared.
     *
     * @param commandSegments must not be {@code null}.
     * @param commandMethod must not be {@code null}.
     */
    void validate(CommandSegments commandSegments, CommandMethod commandMethod) throws CommandMethodSyntaxException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy