object MapRef extends MapRefCompanionPlatform
- Source
- MapRef.scala
- Alphabetic
- By Inheritance
- MapRef
- MapRefCompanionPlatform
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class MapRefOptionOps[F[_], K, V] extends AnyRef
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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def defaultedMapRef[F[_], K, A](mapref: MapRef[F, K, Option[A]], default: A)(implicit arg0: Functor[F], arg1: Eq[A]): MapRef[F, K, A]
- def defaultedRef[F[_], A](ref: kernel.Ref[F, Option[A]], default: A)(implicit arg0: Functor[F], arg1: Eq[A]): kernel.Ref[F, A]
Operates with default and anytime default is present instead information is removed from underlying ref.
Operates with default and anytime default is present instead information is removed from underlying ref. This is very useful as a default state can be used to prevent space leaks over high arity maprefs.
Also useful for anytime a shared storage location is used for a ref, i.e. DB or Redis to not waste space. // Some(default) -- None
- 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])
- def fromConcurrentHashMap[F[_], K, V](map: ConcurrentHashMap[K, V])(implicit arg0: kernel.Sync[F]): MapRef[F, K, Option[V]]
Takes a ConcurrentHashMap, giving you access to the mutable state from the constructor.
Takes a ConcurrentHashMap, giving you access to the mutable state from the constructor.
This uses universal hashCode and equality on K.
- def fromScalaConcurrentMap[F[_], K, V](map: Map[K, V])(implicit arg0: kernel.Sync[F]): MapRef[F, K, Option[V]]
Takes a scala.collection.concurrent.Map, giving you access to the mutable state from the constructor.
- def fromSeqRefs[F[_], K, V](seq: Seq[kernel.Ref[F, Map[K, V]]])(implicit arg0: Functor[F]): MapRef[F, K, Option[V]]
Creates a sharded map ref from a sequence of refs.
Creates a sharded map ref from a sequence of refs.
This uses universal hashCode and equality on K.
- def fromSingleImmutableMapRef[F[_], K, V](ref: kernel.Ref[F, Map[K, V]])(implicit arg0: Functor[F]): MapRef[F, K, Option[V]]
Heavy Contention on Use, Allows you to access the underlying map through processes outside of this interface.
Heavy Contention on Use, Allows you to access the underlying map through processes outside of this interface. Useful for Atomic Map[K, V] => Map[K, V] interactions.
This uses universal hashCode and equality on K.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def inConcurrentHashMap[G[_], F[_], K, V](initialCapacity: Int = 16, loadFactor: Float = 0.75f, concurrencyLevel: Int = 16)(implicit arg0: kernel.Sync[G], arg1: kernel.Sync[F]): G[MapRef[F, K, Option[V]]]
This allocates mutable memory, so it has to be inside F.
This allocates mutable memory, so it has to be inside F. The way to use things like this is to allocate one then
.map
them inside of constructors that need to access them.It is usually a mistake to have a
G[RefMap[F, K, V]]
field. You wantRefMap[F, K, V]
field which means the thing that needs it will also have to be inside ofF[_]
, which is because it needs access to mutable state so allocating it is also an effect.This uses universal hashCode and equality on K.
- def inScalaConcurrentTrieMap[G[_], F[_], K, V](implicit arg0: kernel.Sync[G], arg1: kernel.Sync[F]): G[MapRef[F, K, Option[V]]]
- Definition Classes
- MapRefCompanionPlatform
- def inShardedImmutableMap[G[_], F[_], K, V](shardCount: Int)(implicit arg0: kernel.Sync[G], arg1: kernel.Sync[F]): G[MapRef[F, K, Option[V]]]
Creates a sharded map ref to reduce atomic contention on the Map, given an efficient and equally distributed hash, the contention should allow for interaction like a general datastructure.
Creates a sharded map ref to reduce atomic contention on the Map, given an efficient and equally distributed hash, the contention should allow for interaction like a general datastructure. Created in G, operates in F.
This uses universal hashCode and equality on K.
- def inSingleImmutableMap[G[_], F[_], K, V](map: Map[K, V] = Map.empty[K, V])(implicit arg0: kernel.Sync[G], arg1: kernel.Sync[F]): G[MapRef[F, K, Option[V]]]
Heavy Contention on Use.
Heavy Contention on Use. Created in G, operates in F.
This uses universal hashCode and equality on K.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def mapRefInvariant[F[_], K](implicit arg0: Functor[F]): Invariant[[γ$0$]MapRef[F, K, γ$0$]]
- implicit def mapRefOptionSyntax[F[_], K, V](mRef: MapRef[F, K, Option[V]]): MapRefOptionOps[F, K, V]
- 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()
- def ofConcurrentHashMap[F[_], K, V](initialCapacity: Int = 16, loadFactor: Float = 0.75f, concurrencyLevel: Int = 16)(implicit arg0: kernel.Sync[F]): F[MapRef[F, K, Option[V]]]
This allocates mutable memory, so it has to be inside F.
This allocates mutable memory, so it has to be inside F. The way to use things like this is to allocate one then
.map
them inside of constructors that need to access them.It is usually a mistake to have a
F[RefMap[F, K, V]]
field. You wantRefMap[F, K, V]
field which means the thing that needs it will also have to be inside ofF[_]
, which is because it needs access to mutable state so allocating it is also an effect.This uses universal hashCode and equality on K.
- def ofScalaConcurrentTrieMap[F[_], K, V](implicit arg0: kernel.Sync[F]): F[MapRef[F, K, Option[V]]]
- Definition Classes
- MapRefCompanionPlatform
- def ofShardedImmutableMap[F[_], K, V](shardCount: Int)(implicit arg0: kernel.Concurrent[F]): F[MapRef[F, K, Option[V]]]
Creates a sharded map ref to reduce atomic contention on the Map, given an efficient and equally distributed hash, the contention should allow for interaction like a general datastructure.
Creates a sharded map ref to reduce atomic contention on the Map, given an efficient and equally distributed hash, the contention should allow for interaction like a general datastructure.
This uses universal hashCode and equality on K.
- def ofSingleImmutableMap[F[_], K, V](map: Map[K, V] = Map.empty[K, V])(implicit arg0: kernel.Concurrent[F]): F[MapRef[F, K, Option[V]]]
Heavy Contention on Use
Heavy Contention on Use
This uses universal hashCode and equality on K.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()