class RedisUri extends AnyRef
Contains connection details for the communication with standalone redis servers. Allows to provide the database, client name, password and timeouts and more.
You have different ways to create a RedisUri:
Example
//using an URI RedisUri("redis://localhost:6379") //using host and port RedisUri("localhost", 6379) //then you can pass custom options RedisUri("localhost", 6379) .withDatabase(1) .withPassword("Alice123") //this will normally come from a stored secret .withClientName("companyX")
- Source
- RedisUri.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RedisUri
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new RedisUri(uri: Either[String, (String, Int)], database: Option[Int] = None, password: Option[String] = None, ssl: Option[Boolean] = None, verifyPeer: Option[Boolean] = None, startTls: Option[Boolean] = None, timeout: Option[FiniteDuration] = None, sentinels: List[String] = List.empty, socket: Option[String] = None, sentinelMasterId: Option[String] = None, clientName: Option[String] = None)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val clientName: Option[String]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val database: Option[Int]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val password: Option[String]
- val sentinelMasterId: Option[String]
- val sentinels: List[String]
- val socket: Option[String]
- val ssl: Option[Boolean]
- val startTls: Option[Boolean]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeout: Option[FiniteDuration]
- def toString(): String
- Definition Classes
- AnyRef → Any
- val uri: Either[String, (String, Int)]
- val verifyPeer: Option[Boolean]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withClientName(clientName: String): RedisUri
- def withDatabase(database: Int): RedisUri
- def withPassword(password: String): RedisUri
- def withSentinelMasterId(sentinelMasterId: String): RedisUri
- def withSentinels(sentinels: List[String]): RedisUri
- def withSocket(socket: String): RedisUri
- def withSsl(ssl: Boolean): RedisUri
- def withStartTls(startTls: Boolean): RedisUri
- def withTimeout(timeout: FiniteDuration): RedisUri
- def withVerifyPeer(verifyPeer: Boolean): RedisUri