class RedisPartiallyApplied[F[_]] extends AnyRef
- Source
- redis.scala
- Alphabetic
- By Inheritance
- RedisPartiallyApplied
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toany2stringadd[RedisPartiallyApplied[F]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (RedisPartiallyApplied[F], B)
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toArrowAssoc[RedisPartiallyApplied[F]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def cluster[K, V](codec: RedisCodec[K, V], uris: String*)(readFrom: Option[ReadFrom] = None): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a cluster connection.
Creates a RedisCommands for a cluster connection.
It will also create an underlying RedisClusterClient to establish connection with Redis.
Example:
Redis[IO].cluster( RedisCodec.Utf8, "redis://localhost:30001", "redis://localhost:30002" )
Note: if you need to create multiple connections, use either fromClusterClient or fromClusterClientByNode instead, which allows you to re-use the same client.
- def clusterUtf8(uris: String*)(readFrom: Option[ReadFrom] = None): Resource[F, RedisCommands[F, String, String]]
Creates a RedisCommands for a cluster connection to deal with UTF-8 encoded keys and values.
Creates a RedisCommands for a cluster connection to deal with UTF-8 encoded keys and values.
It will also create an underlying RedisClusterClient to establish connection with Redis.
Example:
Redis[IO].clusterUtf8( "redis://localhost:30001", "redis://localhost:30002" )
Note: if you need to create multiple connections, use either fromClusterClient or fromClusterClientByNode instead, which allows you to re-use the same client.
- def custom[K, V](uri: String, opts: ClientOptions, config: Redis4CatsConfig, codec: RedisCodec[K, V]): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a single-node connection.
Creates a RedisCommands for a single-node connection.
It will create an underlying RedisClient using the supplied client options and config to establish connection with Redis. Can be used to customise advanced features like metric recording or shutdown delays.
Example:
for { opts <- Resource.eval(Sync[F].delay(ClientOptions.create())) // configure timeouts, etc config = Redis4CatsConfig() cmds <- Redis[IO].custom("redis://localhost", opts, config, RedisCodec.Ascii) } yield cmds
Note: if you need to create multiple connections, use
fromClient
instead, which allows you to re-use the same client. - def customPooled[K, V](client: RedisClient, codec: RedisCodec[K, V], poolSettings: Settings)(implicit T: Temporal[F]): Resource[F, KeyPool[F, Unit, RedisCommands[F, K, V]]]
Creates a pool of RedisCommands for a single-node connection.
Creates a pool of RedisCommands for a single-node connection. Similar to pooled but allows custom Redis.Pool.Settings
- def ensuring(cond: (RedisPartiallyApplied[F]) => Boolean, msg: => Any): RedisPartiallyApplied[F]
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toEnsuring[RedisPartiallyApplied[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (RedisPartiallyApplied[F]) => Boolean): RedisPartiallyApplied[F]
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toEnsuring[RedisPartiallyApplied[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): RedisPartiallyApplied[F]
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toEnsuring[RedisPartiallyApplied[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): RedisPartiallyApplied[F]
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toEnsuring[RedisPartiallyApplied[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val fl: FutureLift[F]
- def fromClient[K, V](client: RedisClient, codec: RedisCodec[K, V]): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a single-node connection.
Creates a RedisCommands for a single-node connection.
Example:
val redis: Resource[IO, RedisCommands[IO, String, String]] = for { uri <- Resource.eval(RedisURI.make[IO]("redis://localhost")) cli <- RedisClient[IO](uri) cmd <- Redis[IO].fromClient(cli, RedisCodec.Utf8) } yield cmd
Note: if you don't need to create multiple connections, you might prefer to use either utf8 or
simple
instead. - def fromClusterClient[K, V](clusterClient: RedisClusterClient, codec: RedisCodec[K, V])(readFrom: Option[ReadFrom] = None): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a cluster connection
Creates a RedisCommands for a cluster connection
Example:
val redis: Resource[IO, RedisCommands[IO, String, String]] = for { uris <- Resource.eval( List("redis://localhost:30001", "redis://localhost:30002") .traverse(RedisURI.make[F](_)) ) cli <- RedisClusterClient[IO](uris: _*) cmd <- Redis[IO].fromClusterClient(cli, RedisCodec.Utf8) } yield cmd
Note: if you don't need to create multiple connections, you might prefer to use either clusterUtf8 or cluster instead.
- def fromClusterClientByNode[K, V](clusterClient: RedisClusterClient, codec: RedisCodec[K, V], nodeId: NodeId)(readFrom: Option[ReadFrom] = None): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands by trying to establish a cluster connection to the specified node.
Creates a RedisCommands by trying to establish a cluster connection to the specified node.
Example:
val redis: Resource[IO, RedisCommands[IO, String, String]] = for { uris <- Resource.eval( List("redis://localhost:30001", "redis://localhost:30002") .traverse(RedisURI.make[F](_)) ) cli <- RedisClusterClient[IO](uris: _*) cmd <- Redis[IO].fromClusterClientByNode(cli, RedisCodec.Utf8, NodeId("1")) } yield cmd
Note: if you don't need to create multiple connections, you might prefer to use either clusterUtf8 or cluster instead.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val log: Log[F]
- def masterReplica[K, V](conn: RedisMasterReplica[K, V]): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands from a MasterReplica connection
Creates a RedisCommands from a MasterReplica connection
Example:
val redis: Resource[IO, RedisCommands[IO, String, String]] = for { uri <- Resource.eval(RedisURI.make[IO](redisURI)) conn <- RedisMasterReplica[IO].make(RedisCodec.Utf8, uri)(Some(ReadFrom.MasterPreferred)) cmds <- Redis[IO].masterReplica(conn) } yield cmds
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def pooled[K, V](client: RedisClient, codec: RedisCodec[K, V])(implicit T: Temporal[F]): Resource[F, KeyPool[F, Unit, RedisCommands[F, K, V]]]
Creates a pool of RedisCommands for a single-node connection.
Creates a pool of RedisCommands for a single-node connection.
Example:
val pool: Resource[IO, KeyPool[IO, Unit, RedisCommands[IO, String, String]]] = for { uri <- Resource.eval(RedisURI.make[IO]("redis://localhost")) cli <- RedisClient[IO](uri) pool <- Redis[IO].pooled(cli, RedisCodec.Utf8) } yield pool pool.use(_.withRedisCommands(redis => redis.set(usernameKey, "some value")))
- def simple[K, V](uri: String, codec: RedisCodec[K, V]): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a single-node connection.
Creates a RedisCommands for a single-node connection.
It will create an underlying RedisClient with default options to establish connection with Redis.
Example:
Redis[IO].simple("redis://localhost", RedisCodec.Ascii)
Note: if you need to create multiple connections, use
fromClient
instead, which allows you to re-use the same client. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def utf8(uri: String): Resource[F, RedisCommands[F, String, String]]
Creates a RedisCommands for a single-node connection to deal with UTF-8 encoded keys and values.
Creates a RedisCommands for a single-node connection to deal with UTF-8 encoded keys and values.
It will create an underlying RedisClient with default options to establish connection with Redis.
Example:
Redis[IO].utf8("redis://localhost")
Note: if you need to create multiple connections, use
fromClient
instead, which allows you to re-use the same client. - 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])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withOptions[K, V](uri: String, opts: ClientOptions, codec: RedisCodec[K, V]): Resource[F, RedisCommands[F, K, V]]
Creates a RedisCommands for a single-node connection.
Creates a RedisCommands for a single-node connection.
It will create an underlying RedisClient using the supplied client options to establish connection with Redis.
Example:
for { opts <- Resource.eval(Sync[F].delay(ClientOptions.create())) // configure timeouts, etc cmds <- Redis[IO].withOptions("redis://localhost", opts, RedisCodec.Ascii) } yield cmds
Note: if you need to create multiple connections, use
fromClient
instead, which allows you to re-use the same client.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toStringFormat[RedisPartiallyApplied[F]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (RedisPartiallyApplied[F], B)
- Implicit
- This member is added by an implicit conversion from RedisPartiallyApplied[F] toArrowAssoc[RedisPartiallyApplied[F]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
This is the API documentation for the Redis4Cats library.