Skip to main content

Connection Parameters

Hint

This article is generated by AI translation.

JDBC URL Format
jdbc:dbvisitor:jedis://server?database=0&param1=value1&param2=value2
ParameterTypeDefaultDescription
serverstringRedis server address. Uses 6379 as default port if not specified. Format: ip or ip:port. Cluster mode: ip:port;ip:port or ip;ip;ip
usernamestringUsername
passwordstringPassword
databaseint0Default database
connectTimeoutint5000Connection timeout (milliseconds)
socketTimeoutint10Socket timeout (seconds)
timeZonestringLocal timezone used by the driver when processing time types.
clientNamestringJedis-JDBC-ClientClient name
uncheckNumKeysbooleanfalseWhether to disable key count checking. When set to true, the driver will not check the number of keys required by the executed command, such as numfields in HEXPIRE/HTTL, and numkeys in ZMPOP.
separatorCharchar'\n'Command separator. Default is '\n'. Can be set to (\n, ";" semicolon). The driver will split multiple commands by this character, e.g., SET mykey hello; GET mykey.
interceptorclassCommand interceptor for intercepting JedisCluster or Jedis object command calls. Must implement java.lang.reflect.InvocationHandler
customJedisclassCustom creation of JedisCluster or Jedis objects outside the driver. Must implement net.hasor.dbvisitor.adapter.redis.CustomJedis
maxTotalint8(Cluster) Value of the pool's "maxTotal" configuration property.
maxIdleint8(Cluster) Value of the pool's "maxIdle" configuration property.
minIdleint0(Cluster) Value of the pool's "minIdle" configuration property.
testWhileIdlebooleanfalse(Cluster) Value of the pool's "testWhileIdle" configuration property.
maxAttemptsint5(Cluster) Maximum number of attempts for executing commands.
  • The uncheckNumKeys parameter affects the following commands:
    • HEXPIRE, HEXPIREAT, HEXPIRETIME, HPEXPIRE, HPEXPIREAT, HPEXPIRETIME, HPERSIST, HTTL, HPTTL
    • ZMPOP, BZMPOP, ZDIFF, ZDIFFSTORE, ZINTER, ZINTERCARD, ZINTERSTORE, ZUNION, ZUNIONSTORE
    • LMPOP, BLMPOP, SINTERCARD
  • When separatorChar is set to ";" (semicolon):
    • Content containing semicolons must be enclosed in double quotes to avoid script parsing errors.