LanguageExt.Core

LanguageExt.Core Concurrency VersionVector

Contents

record Version <Actor, K, V> (K Key) Source #

Wraps up a version vector, making it easier to work with and not generics hell

Parameters

type Actor

Actor type

type V

Value type

Properties

property Option<V> Value Source #

Get the value if there is one

Methods

method Version<Actor, K, V> Write (Actor actor, long timeStamp, V value) Source #

Perform a write to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write

method Version<Actor, K, V> Write (Actor actor, V value) Source #

Perform a write to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write

method Version<Actor, K, V> Delete (Actor actor, long timeStamp) Source #

Perform a delete to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write

method Version<Actor, K, V> Delete (Actor actor) Source #

Perform a delete to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write

record VersionVector <ConflictA, OrdActor, NumClock, Actor, Clock, A> ( Option<A> Value, long TimeStamp, VectorClock<OrdActor, NumClock, Actor, Clock> Vector) Source #

where OrdActor : Ord<Actor>
where NumClock : Num<Clock>
where ConflictA : Conflict<A>

Version vector. Container of an optional value, a time-stamp, and a vector clock. Used to manage versioning of a single value. ConflictA allows for injectable conflict resolution.

Parameters

type ConflictA

Conflict resolution instance type

type OrdActor

Actor ordering instance type

type NumClock

Numeric clock instance type

type Actor

Actor type

type Clock

Clock type

type A

Value to version type

Methods

method VersionVector<ConflictA, OrdActor, NumClock, Actor, Clock, A> Put ( VersionVector<ConflictA, OrdActor, NumClock, Actor, Clock, A> version) Source #

Register a write from any actor

Parameters

param actor

Actor that did the write operation

param value

Value that the actor wrote

param vector

The vector of the actor

returns

method VersionVector<ConflictA, OrdActor, NumClock, Actor, Clock, A> Put (Actor actor, long timeStamp, Option<A> value) Source #

Perform a write to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write

record VersionVector <ConflictA, Actor, A> (Option<A> Value, long TimeStamp, VectorClock<Actor> Vector) Source #

where Actor : IComparable<Actor>
where ConflictA : Conflict<A>

Version vector. Container of an optional value, a time-stamp, and a vector clock. Used to manage versioning of a single value. ConflictA allows for injectable conflict resolution.

Parameters

type ConflictA

Conflict resolution instance type

type Actor

Actor type

type A

Value to version type

Methods

method VersionVector<ConflictA, Actor, A> Put (VersionVector<ConflictA, Actor, A> version) Source #

Register a write from any actor

Parameters

param actor

Actor that did the write operation

param value

Value that the actor wrote

param vector

The vector of the actor

returns

method VersionVector<ConflictA, Actor, A> Put (Actor actor, long timeStamp, Option<A> value) Source #

Perform a write to the vector. This increases the vector-clock by 1 for the actor provided.

Parameters

param value

Value to write