public static class DriverInfo.Builder
extends java.lang.Object
DriverInfo instances.| Modifier and Type | Method and Description |
|---|---|
DriverInfo.Builder |
addUpstreamDriver(java.lang.String driverName) |
DriverInfo.Builder |
addUpstreamDriver(java.lang.String driverName,
java.lang.String driverVersion)
Adds an upstream driver to the driver information.
|
DriverInfo |
build()
Builds and returns a new immutable
DriverInfo instance. |
DriverInfo.Builder |
name(java.lang.String name)
Sets the base library name.
|
public DriverInfo.Builder name(java.lang.String name)
This overrides the default name ("Jedis"). Use this when you want to completely customize the library identification.
name - the library name, must not be nullJedisValidationException - if name is nullpublic DriverInfo.Builder addUpstreamDriver(java.lang.String driverName, java.lang.String driverVersion)
Upstream drivers are prepended to the list, so the most recently added driver appears first in the formatted output.
The driver name must follow Maven artifactId naming conventions: lowercase letters, digits, hyphens, and underscores only, starting with a lowercase letter. Dots are only allowed after digits (for Scala cross-version naming like akka-redis_2.13).
Both values must not contain spaces, newlines, non-printable characters, or brace characters as these would violate the format of the Redis CLIENT LIST reply.
driverName - the name of the upstream driver (e.g., "spring-data-redis"), must not be
nulldriverVersion - the version of the upstream driver (e.g., "3.2.0"), must not be
nullJedisValidationException - if the driver name or version is null or has invalid
formatpublic DriverInfo.Builder addUpstreamDriver(java.lang.String driverName)
public DriverInfo build()
DriverInfo instance.Copyright © 2025. All rights reserved.