Package com.tuladb

Record Class Models.LedgerInstance

java.lang.Object
java.lang.Record
com.tuladb.Models.LedgerInstance
Enclosing class:
Models

public static record Models.LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec, long reserveTtlNs, long maxTxnAmount) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec)
    Backwards-compatible overload: no reservation TTL (expiry disabled).
    LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec, long reserveTtlNs)
    Backwards-compatible overload: no amount cap.
    LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec, long reserveTtlNs, long maxTxnAmount)
    Creates an instance of a LedgerInstance record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the active record component.
    long
    Returns the value of the createdAtSec record component.
    int
    Returns the value of the currency record component.
    int
    Returns the value of the defaultTier record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the ledgerId record component.
    long
    Returns the value of the maxTxnAmount record component.
    int
    Returns the value of the mode record component.
    ofDefault(int currency)
     
    ofPositionSettlement(int currency, int positionTier, int settlementTier)
     
    int
    Returns the value of the positionTier record component.
    long
    Returns the value of the reserveTtlNs record component.
    int
    Returns the value of the settlementTier record component.
    final String
    Returns a string representation of this record class.
    withReserveTtlNs(long ttlNs)
    Same ledger with a reservation TTL applied.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LedgerInstance

      public LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec, long reserveTtlNs)
      Backwards-compatible overload: no amount cap.
    • LedgerInstance

      public LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec)
      Backwards-compatible overload: no reservation TTL (expiry disabled). Kept so existing 8-argument callers still compile after the field was added.
    • LedgerInstance

      public LedgerInstance(int ledgerId, int currency, int mode, int active, int defaultTier, int positionTier, int settlementTier, long createdAtSec, long reserveTtlNs, long maxTxnAmount)
      Creates an instance of a LedgerInstance record class.
      Parameters:
      ledgerId - the value for the ledgerId record component
      currency - the value for the currency record component
      mode - the value for the mode record component
      active - the value for the active record component
      defaultTier - the value for the defaultTier record component
      positionTier - the value for the positionTier record component
      settlementTier - the value for the settlementTier record component
      createdAtSec - the value for the createdAtSec record component
      reserveTtlNs - the value for the reserveTtlNs record component
      maxTxnAmount - the value for the maxTxnAmount record component
  • Method Details

    • ofDefault

      public static Models.LedgerInstance ofDefault(int currency)
    • ofPositionSettlement

      public static Models.LedgerInstance ofPositionSettlement(int currency, int positionTier, int settlementTier)
    • withReserveTtlNs

      public Models.LedgerInstance withReserveTtlNs(long ttlNs)
      Same ledger with a reservation TTL applied.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ledgerId

      public int ledgerId()
      Returns the value of the ledgerId record component.
      Returns:
      the value of the ledgerId record component
    • currency

      public int currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • mode

      public int mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • active

      public int active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component
    • defaultTier

      public int defaultTier()
      Returns the value of the defaultTier record component.
      Returns:
      the value of the defaultTier record component
    • positionTier

      public int positionTier()
      Returns the value of the positionTier record component.
      Returns:
      the value of the positionTier record component
    • settlementTier

      public int settlementTier()
      Returns the value of the settlementTier record component.
      Returns:
      the value of the settlementTier record component
    • createdAtSec

      public long createdAtSec()
      Returns the value of the createdAtSec record component.
      Returns:
      the value of the createdAtSec record component
    • reserveTtlNs

      public long reserveTtlNs()
      Returns the value of the reserveTtlNs record component.
      Returns:
      the value of the reserveTtlNs record component
    • maxTxnAmount

      public long maxTxnAmount()
      Returns the value of the maxTxnAmount record component.
      Returns:
      the value of the maxTxnAmount record component