Skip to content

FromEnvironment Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.IdGenerator.dll

Overloads ​

NameDescription
OrderedIdGenerator FromEnvironment(OrderedIdClockMode mode = null, int maxLogicalSkewMS = null)Creates a generator using DefaultEpoch and the node id from JASE_ID_GENERATOR_NODE (0..1023).
OrderedIdGenerator FromEnvironment(DateTime epochUtc, OrderedIdClockMode mode = null, int maxLogicalSkewMS = null)Creates a generator using a custom epoch and the node id from JASE_ID_GENERATOR_NODE (0..1023).

OrderedIdGenerator FromEnvironment(OrderedIdClockMode mode = null, int maxLogicalSkewMS = null) ​

csharp
OrderedIdGenerator FromEnvironment(OrderedIdClockMode mode = null, int maxLogicalSkewMS = null)

Creates a generator using DefaultEpoch and the node id from JASE_ID_GENERATOR_NODE (0..1023).

Parameters ​

NameDescription
maxLogicalSkewMSMaximum allowed forward skew (milliseconds) for LogicalClock. Ignored by WallClock.
modeClock semantics controlling how timestamps advance under contention and rollback.

OrderedIdGenerator FromEnvironment(DateTime epochUtc, OrderedIdClockMode mode = null, int maxLogicalSkewMS = null) ​

csharp
OrderedIdGenerator FromEnvironment(DateTime epochUtc, OrderedIdClockMode mode = null, int maxLogicalSkewMS = null)

Creates a generator using a custom epoch and the node id from JASE_ID_GENERATOR_NODE (0..1023).

Parameters ​

NameDescription
epochUtcCustom epoch (UTC). All timestamps are stored as milliseconds since this epoch.
maxLogicalSkewMSMaximum allowed forward skew (milliseconds) for LogicalClock. Ignored by WallClock.
modeClock semantics controlling how timestamps advance under contention and rollback.