Class Flag
Implements a boolean flag CRDT that is initialized to false
and
can be switched to true
. true
wins over false
in merge.
This class is immutable, i.e. "modifying" methods return a new instance.
Implements
Inherited Members
Namespace: Akka.DistributedData
Assembly: Akka.DistributedData.dll
Syntax
[Serializable]
public sealed class Flag : IReplicatedData<Flag>, IReplicatedData, IEquatable<Flag>, IComparable<Flag>, IComparable, IReplicatedDataSerialization
Constructors
| Improve this Doc View SourceFlag()
Creates a new Flag instance set to false by default.
Declaration
public Flag()
Flag(Boolean)
Creates a new Flag instance with value set to specified parameter.
Declaration
public Flag(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enabled | TBD |
Fields
| Improve this Doc View SourceFalse
Flag with a false value set.
Declaration
public static readonly Flag False
Field Value
Type | Description |
---|---|
Flag |
True
Flag with a true value set.
Declaration
public static readonly Flag True
Field Value
Type | Description |
---|---|
Flag |
Properties
| Improve this Doc View SourceEnabled
Checks if current flag value is set.
Declaration
public bool Enabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceCompareTo(Flag)
Declaration
public int CompareTo(Flag other)
Parameters
Type | Name | Description |
---|---|---|
Flag | other |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Int32 |
Equals(Flag)
Checks if two flags are equal to each other.
Declaration
public bool Equals(Flag other)
Parameters
Type | Name | Description |
---|---|---|
Flag | other | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceMerge(Flag)
TBD
Declaration
public Flag Merge(Flag other)
Parameters
Type | Name | Description |
---|---|---|
Flag | other | TBD |
Returns
Type | Description |
---|---|
Flag | TBD |
SwitchOn()
TBD
Declaration
public Flag SwitchOn()
Returns
Type | Description |
---|---|
Flag | TBD |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
| Improve this Doc View SourceImplicit(Flag to Boolean)
Declaration
public static implicit operator bool (Flag flag)
Parameters
Type | Name | Description |
---|---|---|
Flag | flag | The flag to convert |
Returns
Type | Description |
---|---|
Boolean | The result of the conversion |
Explicit Interface Implementations
| Improve this Doc View SourceIReplicatedData.Merge(IReplicatedData)
TBD
Declaration
IReplicatedData IReplicatedData.Merge(IReplicatedData other)
Parameters
Type | Name | Description |
---|---|---|
IReplicatedData | other | TBD |
Returns
Type | Description |
---|---|
IReplicatedData | TBD |