Class StateArchivalSettings

java.lang.Object
org.stellar.sdk.xdr.StateArchivalSettings

public class StateArchivalSettings extends Object
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 BucketList size
     uint32 bucketListSizeWindowSampleSize;

     // How often to sample the BucketList size for the average, in ledgers
     uint32 bucketListWindowSamplePeriod;

     // Maximum number of bytes that we scan for eviction per ledger
     uint32 evictionScanSize;

     // Lowest BucketList level to be scanned to evict entries
     uint32 startingEvictionScanLevel;
 };
 
  • Constructor Details

    • StateArchivalSettings

      public StateArchivalSettings()
    • StateArchivalSettings

      public StateArchivalSettings(Uint32 maxEntryTTL, Uint32 minTemporaryTTL, Uint32 minPersistentTTL, Int64 persistentRentRateDenominator, Int64 tempRentRateDenominator, Uint32 maxEntriesToArchive, Uint32 bucketListSizeWindowSampleSize, Uint32 bucketListWindowSamplePeriod, Uint32 evictionScanSize, Uint32 startingEvictionScanLevel)
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Throws:
      IOException
    • decode

      public static StateArchivalSettings decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static StateArchivalSettings fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static StateArchivalSettings fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • builder

    • toBuilder

    • getMaxEntryTTL

      public Uint32 getMaxEntryTTL()
    • getMinTemporaryTTL

      public Uint32 getMinTemporaryTTL()
    • getMinPersistentTTL

      public Uint32 getMinPersistentTTL()
    • getPersistentRentRateDenominator

      public Int64 getPersistentRentRateDenominator()
    • getTempRentRateDenominator

      public Int64 getTempRentRateDenominator()
    • getMaxEntriesToArchive

      public Uint32 getMaxEntriesToArchive()
    • getBucketListSizeWindowSampleSize

      public Uint32 getBucketListSizeWindowSampleSize()
    • getBucketListWindowSamplePeriod

      public Uint32 getBucketListWindowSamplePeriod()
    • getEvictionScanSize

      public Uint32 getEvictionScanSize()
    • getStartingEvictionScanLevel

      public Uint32 getStartingEvictionScanLevel()
    • setMaxEntryTTL

      public void setMaxEntryTTL(Uint32 maxEntryTTL)
    • setMinTemporaryTTL

      public void setMinTemporaryTTL(Uint32 minTemporaryTTL)
    • setMinPersistentTTL

      public void setMinPersistentTTL(Uint32 minPersistentTTL)
    • setPersistentRentRateDenominator

      public void setPersistentRentRateDenominator(Int64 persistentRentRateDenominator)
    • setTempRentRateDenominator

      public void setTempRentRateDenominator(Int64 tempRentRateDenominator)
    • setMaxEntriesToArchive

      public void setMaxEntriesToArchive(Uint32 maxEntriesToArchive)
    • setBucketListSizeWindowSampleSize

      public void setBucketListSizeWindowSampleSize(Uint32 bucketListSizeWindowSampleSize)
    • setBucketListWindowSamplePeriod

      public void setBucketListWindowSamplePeriod(Uint32 bucketListWindowSamplePeriod)
    • setEvictionScanSize

      public void setEvictionScanSize(Uint32 evictionScanSize)
    • setStartingEvictionScanLevel

      public void setStartingEvictionScanLevel(Uint32 startingEvictionScanLevel)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXdrBase64

      default String toXdrBase64() throws IOException
      Throws:
      IOException
    • toXdrByteArray

      default byte[] toXdrByteArray() throws IOException
      Throws:
      IOException