Package org.stellar.sdk.xdr
Class StateArchivalSettings
java.lang.Object
org.stellar.sdk.xdr.StateArchivalSettings
- All Implemented Interfaces:
XdrElement
StateArchivalSettings's original definition in the XDR file is:
struct StateArchivalSettings {
uint32 maxEntryTTL;
uint32 minTemporaryTTL;
uint32 minPersistentTTL;
// rent_fee = wfee_rate_average / rent_rate_denominator_for_type
int64 persistentRentRateDenominator;
int64 tempRentRateDenominator;
// max number of entries that emit archival meta in a single ledger
uint32 maxEntriesToArchive;
// Number of snapshots to use when calculating average live Soroban State size
uint32 liveSorobanStateSizeWindowSampleSize;
// How often to sample the live Soroban State size for the average, in ledgers
uint32 liveSorobanStateSizeWindowSamplePeriod;
// Maximum number of bytes that we scan for eviction per ledger
uint32 evictionScanSize;
// Lowest BucketList level to be scanned to evict entries
uint32 startingEvictionScanLevel;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionStateArchivalSettings(Uint32 maxEntryTTL, Uint32 minTemporaryTTL, Uint32 minPersistentTTL, Int64 persistentRentRateDenominator, Int64 tempRentRateDenominator, Uint32 maxEntriesToArchive, Uint32 liveSorobanStateSizeWindowSampleSize, Uint32 liveSorobanStateSizeWindowSamplePeriod, Uint32 evictionScanSize, Uint32 startingEvictionScanLevel) Creates a newStateArchivalSettingsinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static StateArchivalSettingsdecode(XdrDataInputStream stream) static StateArchivalSettingsdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic StateArchivalSettingsstatic StateArchivalSettingsfromXdrBase64(String xdr) static StateArchivalSettingsfromXdrByteArray(byte[] xdr) Value of theevictionScanSizefield.Value of theliveSorobanStateSizeWindowSamplePeriodfield.Value of theliveSorobanStateSizeWindowSampleSizefield.Value of themaxEntriesToArchivefield.Value of themaxEntryTTLfield.Value of theminPersistentTTLfield.Value of theminTemporaryTTLfield.Value of thepersistentRentRateDenominatorfield.Value of thestartingEvictionScanLevelfield.Value of thetempRentRateDenominatorfield.inthashCode()voidsetEvictionScanSize(Uint32 evictionScanSize) Value of theevictionScanSizefield.voidsetLiveSorobanStateSizeWindowSamplePeriod(Uint32 liveSorobanStateSizeWindowSamplePeriod) Value of theliveSorobanStateSizeWindowSamplePeriodfield.voidsetLiveSorobanStateSizeWindowSampleSize(Uint32 liveSorobanStateSizeWindowSampleSize) Value of theliveSorobanStateSizeWindowSampleSizefield.voidsetMaxEntriesToArchive(Uint32 maxEntriesToArchive) Value of themaxEntriesToArchivefield.voidsetMaxEntryTTL(Uint32 maxEntryTTL) Value of themaxEntryTTLfield.voidsetMinPersistentTTL(Uint32 minPersistentTTL) Value of theminPersistentTTLfield.voidsetMinTemporaryTTL(Uint32 minTemporaryTTL) Value of theminTemporaryTTLfield.voidsetPersistentRentRateDenominator(Int64 persistentRentRateDenominator) Value of thepersistentRentRateDenominatorfield.voidsetStartingEvictionScanLevel(Uint32 startingEvictionScanLevel) Value of thestartingEvictionScanLevelfield.voidsetTempRentRateDenominator(Int64 tempRentRateDenominator) Value of thetempRentRateDenominatorfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
StateArchivalSettings
public StateArchivalSettings() -
StateArchivalSettings
public StateArchivalSettings(Uint32 maxEntryTTL, Uint32 minTemporaryTTL, Uint32 minPersistentTTL, Int64 persistentRentRateDenominator, Int64 tempRentRateDenominator, Uint32 maxEntriesToArchive, Uint32 liveSorobanStateSizeWindowSampleSize, Uint32 liveSorobanStateSizeWindowSamplePeriod, Uint32 evictionScanSize, Uint32 startingEvictionScanLevel) Creates a newStateArchivalSettingsinstance.- Parameters:
maxEntryTTL- themaxEntryTTLfield valueminTemporaryTTL- theminTemporaryTTLfield valueminPersistentTTL- theminPersistentTTLfield valuepersistentRentRateDenominator- thepersistentRentRateDenominatorfield valuetempRentRateDenominator- thetempRentRateDenominatorfield valuemaxEntriesToArchive- themaxEntriesToArchivefield valueliveSorobanStateSizeWindowSampleSize- theliveSorobanStateSizeWindowSampleSizefield valueliveSorobanStateSizeWindowSamplePeriod- theliveSorobanStateSizeWindowSamplePeriodfield valueevictionScanSize- theevictionScanSizefield valuestartingEvictionScanLevel- thestartingEvictionScanLevelfield 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
public static StateArchivalSettings decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getMaxEntryTTL
Value of themaxEntryTTLfield.- Returns:
- the
maxEntryTTLfield value
-
getMinTemporaryTTL
Value of theminTemporaryTTLfield.- Returns:
- the
minTemporaryTTLfield value
-
getMinPersistentTTL
Value of theminPersistentTTLfield.- Returns:
- the
minPersistentTTLfield value
-
getPersistentRentRateDenominator
Value of thepersistentRentRateDenominatorfield.- Returns:
- the
persistentRentRateDenominatorfield value
-
getTempRentRateDenominator
Value of thetempRentRateDenominatorfield.- Returns:
- the
tempRentRateDenominatorfield value
-
getMaxEntriesToArchive
Value of themaxEntriesToArchivefield.- Returns:
- the
maxEntriesToArchivefield value
-
getLiveSorobanStateSizeWindowSampleSize
Value of theliveSorobanStateSizeWindowSampleSizefield.- Returns:
- the
liveSorobanStateSizeWindowSampleSizefield value
-
getLiveSorobanStateSizeWindowSamplePeriod
Value of theliveSorobanStateSizeWindowSamplePeriodfield.- Returns:
- the
liveSorobanStateSizeWindowSamplePeriodfield value
-
getEvictionScanSize
Value of theevictionScanSizefield.- Returns:
- the
evictionScanSizefield value
-
getStartingEvictionScanLevel
Value of thestartingEvictionScanLevelfield.- Returns:
- the
startingEvictionScanLevelfield value
-
setMaxEntryTTL
Value of themaxEntryTTLfield.- Parameters:
maxEntryTTL- themaxEntryTTLfield value
-
setMinTemporaryTTL
Value of theminTemporaryTTLfield.- Parameters:
minTemporaryTTL- theminTemporaryTTLfield value
-
setMinPersistentTTL
Value of theminPersistentTTLfield.- Parameters:
minPersistentTTL- theminPersistentTTLfield value
-
setPersistentRentRateDenominator
Value of thepersistentRentRateDenominatorfield.- Parameters:
persistentRentRateDenominator- thepersistentRentRateDenominatorfield value
-
setTempRentRateDenominator
Value of thetempRentRateDenominatorfield.- Parameters:
tempRentRateDenominator- thetempRentRateDenominatorfield value
-
setMaxEntriesToArchive
Value of themaxEntriesToArchivefield.- Parameters:
maxEntriesToArchive- themaxEntriesToArchivefield value
-
setLiveSorobanStateSizeWindowSampleSize
Value of theliveSorobanStateSizeWindowSampleSizefield.- Parameters:
liveSorobanStateSizeWindowSampleSize- theliveSorobanStateSizeWindowSampleSizefield value
-
setLiveSorobanStateSizeWindowSamplePeriod
public void setLiveSorobanStateSizeWindowSamplePeriod(Uint32 liveSorobanStateSizeWindowSamplePeriod) Value of theliveSorobanStateSizeWindowSamplePeriodfield.- Parameters:
liveSorobanStateSizeWindowSamplePeriod- theliveSorobanStateSizeWindowSamplePeriodfield value
-
setEvictionScanSize
Value of theevictionScanSizefield.- Parameters:
evictionScanSize- theevictionScanSizefield value
-
setStartingEvictionScanLevel
Value of thestartingEvictionScanLevelfield.- Parameters:
startingEvictionScanLevel- thestartingEvictionScanLevelfield value
-
equals
-
hashCode
public int hashCode() -
toString
-