HashConsed
scalus.utils.HashConsed
object HashConsed
Objects are hash-consed during restoring from file. Note, that identityHashCode can be different on the different VM-s, so it is not safe to reky on it. value-based hash-code now is not determenistics on recuresive data structures with self-references. So, we use identityHashCode on VN which store file and restore internal references on other VN.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HashConsed.type
Members list
Type members
Classlikes
class CachedTaggedRef[A <: AnyRef](val tag: Tag, val ref: HashConsedRef[A]) extends HashConsedRef[A]
Attributes
- Supertypes
case class ConstRef[A <: AnyRef](value: A) extends HashConsedRef[A]
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HashConsedRef[A]class Objecttrait Matchableclass AnyShow all
object ConstRef
class ForwardRef[A <: AnyRef](val ihc: Int, val tag: Tag) extends HashConsedRef[A]
Attributes
- Companion
- object
- Supertypes
object ForwardRef
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ForwardRef.type
class ForwardRefAcceptor(val ihc: Int, val tag: Tag, var setRefActions: List[(HashConsedRef[_]) => Unit])
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
class MutRef[A <: AnyRef](var value: A | Null) extends HashConsedRef[A]
Attributes
- Companion
- object
- Supertypes
object MutRef
case class State(forwardRefAcceptors: Map[(Int, Int), ForwardRefAcceptor], refs: Map[(Int, Int), CachedTaggedRef[_]], forwardValueAcceptors: Map[(Int, Int), ForwardValueAcceptor])
Value parameters
- forwardRefAcceptors
-
- set of forward references, which are not yet resolved from hashConded
- forwardValueAcceptors
-
- set of callbacks, which should be called after the value is readed.
- refs
-
- set of references
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Types
Value members
Concrete methods
def putForwadValueAcceptor[A <: AnyRef](state: State, ihc: Int, tag: Tag, acceptor: A => Unit): Unit
In this article