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
ConstructorsConstructorDescriptionLedgerInstance(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 aLedgerInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintactive()Returns the value of theactiverecord component.longReturns the value of thecreatedAtSecrecord component.intcurrency()Returns the value of thecurrencyrecord component.intReturns the value of thedefaultTierrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intledgerId()Returns the value of theledgerIdrecord component.longReturns the value of themaxTxnAmountrecord component.intmode()Returns the value of themoderecord component.static Models.LedgerInstanceofDefault(int currency) static Models.LedgerInstanceofPositionSettlement(int currency, int positionTier, int settlementTier) intReturns the value of thepositionTierrecord component.longReturns the value of thereserveTtlNsrecord component.intReturns the value of thesettlementTierrecord component.final StringtoString()Returns a string representation of this record class.withReserveTtlNs(long ttlNs) Same ledger with a reservation TTL applied.
-
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 aLedgerInstancerecord class.- Parameters:
ledgerId- the value for theledgerIdrecord componentcurrency- the value for thecurrencyrecord componentmode- the value for themoderecord componentactive- the value for theactiverecord componentdefaultTier- the value for thedefaultTierrecord componentpositionTier- the value for thepositionTierrecord componentsettlementTier- the value for thesettlementTierrecord componentcreatedAtSec- the value for thecreatedAtSecrecord componentreserveTtlNs- the value for thereserveTtlNsrecord componentmaxTxnAmount- the value for themaxTxnAmountrecord component
-
-
Method Details
-
ofDefault
-
ofPositionSettlement
public static Models.LedgerInstance ofPositionSettlement(int currency, int positionTier, int settlementTier) -
withReserveTtlNs
Same ledger with a reservation TTL applied. -
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. -
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. -
equals
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 '=='. -
ledgerId
public int ledgerId()Returns the value of theledgerIdrecord component.- Returns:
- the value of the
ledgerIdrecord component
-
currency
public int currency()Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
mode
public int mode()Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
active
public int active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
defaultTier
public int defaultTier()Returns the value of thedefaultTierrecord component.- Returns:
- the value of the
defaultTierrecord component
-
positionTier
public int positionTier()Returns the value of thepositionTierrecord component.- Returns:
- the value of the
positionTierrecord component
-
settlementTier
public int settlementTier()Returns the value of thesettlementTierrecord component.- Returns:
- the value of the
settlementTierrecord component
-
createdAtSec
public long createdAtSec()Returns the value of thecreatedAtSecrecord component.- Returns:
- the value of the
createdAtSecrecord component
-
reserveTtlNs
public long reserveTtlNs()Returns the value of thereserveTtlNsrecord component.- Returns:
- the value of the
reserveTtlNsrecord component
-
maxTxnAmount
public long maxTxnAmount()Returns the value of themaxTxnAmountrecord component.- Returns:
- the value of the
maxTxnAmountrecord component
-