Package org.stellar.sdk.xdr
Class LedgerUpgrade
java.lang.Object
org.stellar.sdk.xdr.LedgerUpgrade
- All Implemented Interfaces:
XdrElement
LedgerUpgrade's original definition in the XDR file is:
union LedgerUpgrade switch (LedgerUpgradeType type)
{
case LEDGER_UPGRADE_VERSION:
uint32 newLedgerVersion; // update ledgerVersion
case LEDGER_UPGRADE_BASE_FEE:
uint32 newBaseFee; // update baseFee
case LEDGER_UPGRADE_MAX_TX_SET_SIZE:
uint32 newMaxTxSetSize; // update maxTxSetSize
case LEDGER_UPGRADE_BASE_RESERVE:
uint32 newBaseReserve; // update baseReserve
case LEDGER_UPGRADE_FLAGS:
uint32 newFlags; // update flags
case LEDGER_UPGRADE_CONFIG:
// Update arbitrary `ConfigSetting` entries identified by the key.
ConfigUpgradeSetKey newConfig;
case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE:
// Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without
// using `LEDGER_UPGRADE_CONFIG`.
uint32 newMaxSorobanTxSetSize;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerUpgrade(LedgerUpgradeType discriminant, Uint32 newLedgerVersion, Uint32 newBaseFee, Uint32 newMaxTxSetSize, Uint32 newBaseReserve, Uint32 newFlags, ConfigUpgradeSetKey newConfig, Uint32 newMaxSorobanTxSetSize) Creates a newLedgerUpgradeinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerUpgradedecode(XdrDataInputStream stream) static LedgerUpgradedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerUpgradestatic LedgerUpgradefromXdrBase64(String xdr) static LedgerUpgradefromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of thenewBaseFeefield.Value of thenewBaseReservefield.Value of thenewConfigfield.Value of thenewFlagsfield.Value of thenewLedgerVersionfield.Value of thenewMaxSorobanTxSetSizefield.Value of thenewMaxTxSetSizefield.inthashCode()voidsetDiscriminant(LedgerUpgradeType discriminant) Value of thediscriminantfield.voidsetNewBaseFee(Uint32 newBaseFee) Value of thenewBaseFeefield.voidsetNewBaseReserve(Uint32 newBaseReserve) Value of thenewBaseReservefield.voidsetNewConfig(ConfigUpgradeSetKey newConfig) Value of thenewConfigfield.voidsetNewFlags(Uint32 newFlags) Value of thenewFlagsfield.voidsetNewLedgerVersion(Uint32 newLedgerVersion) Value of thenewLedgerVersionfield.voidsetNewMaxSorobanTxSetSize(Uint32 newMaxSorobanTxSetSize) Value of thenewMaxSorobanTxSetSizefield.voidsetNewMaxTxSetSize(Uint32 newMaxTxSetSize) Value of thenewMaxTxSetSizefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerUpgrade
public LedgerUpgrade() -
LedgerUpgrade
public LedgerUpgrade(LedgerUpgradeType discriminant, Uint32 newLedgerVersion, Uint32 newBaseFee, Uint32 newMaxTxSetSize, Uint32 newBaseReserve, Uint32 newFlags, ConfigUpgradeSetKey newConfig, Uint32 newMaxSorobanTxSetSize) Creates a newLedgerUpgradeinstance.- Parameters:
discriminant- thediscriminantfield valuenewLedgerVersion- thenewLedgerVersionfield valuenewBaseFee- thenewBaseFeefield valuenewMaxTxSetSize- thenewMaxTxSetSizefield valuenewBaseReserve- thenewBaseReservefield valuenewFlags- thenewFlagsfield valuenewConfig- thenewConfigfield valuenewMaxSorobanTxSetSize- thenewMaxSorobanTxSetSizefield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getNewLedgerVersion
Value of thenewLedgerVersionfield.- Returns:
- the
newLedgerVersionfield value
-
getNewBaseFee
Value of thenewBaseFeefield.- Returns:
- the
newBaseFeefield value
-
getNewMaxTxSetSize
Value of thenewMaxTxSetSizefield.- Returns:
- the
newMaxTxSetSizefield value
-
getNewBaseReserve
Value of thenewBaseReservefield.- Returns:
- the
newBaseReservefield value
-
getNewFlags
Value of thenewFlagsfield.- Returns:
- the
newFlagsfield value
-
getNewConfig
Value of thenewConfigfield.- Returns:
- the
newConfigfield value
-
getNewMaxSorobanTxSetSize
Value of thenewMaxSorobanTxSetSizefield.- Returns:
- the
newMaxSorobanTxSetSizefield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setNewLedgerVersion
Value of thenewLedgerVersionfield.- Parameters:
newLedgerVersion- thenewLedgerVersionfield value
-
setNewBaseFee
Value of thenewBaseFeefield.- Parameters:
newBaseFee- thenewBaseFeefield value
-
setNewMaxTxSetSize
Value of thenewMaxTxSetSizefield.- Parameters:
newMaxTxSetSize- thenewMaxTxSetSizefield value
-
setNewBaseReserve
Value of thenewBaseReservefield.- Parameters:
newBaseReserve- thenewBaseReservefield value
-
setNewFlags
Value of thenewFlagsfield.- Parameters:
newFlags- thenewFlagsfield value
-
setNewConfig
Value of thenewConfigfield.- Parameters:
newConfig- thenewConfigfield value
-
setNewMaxSorobanTxSetSize
Value of thenewMaxSorobanTxSetSizefield.- Parameters:
newMaxSorobanTxSetSize- thenewMaxSorobanTxSetSizefield value
-
equals
-
hashCode
public int hashCode() -
toString
-