Class TimeSlicedNodeData

java.lang.Object
org.stellar.sdk.xdr.TimeSlicedNodeData
All Implemented Interfaces:
XdrElement

public class TimeSlicedNodeData extends Object implements XdrElement
TimeSlicedNodeData's original definition in the XDR file is:
 struct TimeSlicedNodeData
 {
     uint32 addedAuthenticatedPeers;
     uint32 droppedAuthenticatedPeers;
     uint32 totalInboundPeerCount;
     uint32 totalOutboundPeerCount;

     // SCP stats
     uint32 p75SCPFirstToSelfLatencyMs;
     uint32 p75SCPSelfToOtherLatencyMs;

     // How many times the node lost sync in the time slice
     uint32 lostSyncCount;

     // Config data
     bool isValidator;
     uint32 maxInboundPeerCount;
     uint32 maxOutboundPeerCount;
 };
 
  • Constructor Details

    • TimeSlicedNodeData

      public TimeSlicedNodeData()
    • TimeSlicedNodeData

      public TimeSlicedNodeData(Uint32 addedAuthenticatedPeers, Uint32 droppedAuthenticatedPeers, Uint32 totalInboundPeerCount, Uint32 totalOutboundPeerCount, Uint32 p75SCPFirstToSelfLatencyMs, Uint32 p75SCPSelfToOtherLatencyMs, Uint32 lostSyncCount, Boolean isValidator, Uint32 maxInboundPeerCount, Uint32 maxOutboundPeerCount)
      Creates a new TimeSlicedNodeData instance.
      Parameters:
      addedAuthenticatedPeers - the addedAuthenticatedPeers field value
      droppedAuthenticatedPeers - the droppedAuthenticatedPeers field value
      totalInboundPeerCount - the totalInboundPeerCount field value
      totalOutboundPeerCount - the totalOutboundPeerCount field value
      p75SCPFirstToSelfLatencyMs - the p75SCPFirstToSelfLatencyMs field value
      p75SCPSelfToOtherLatencyMs - the p75SCPSelfToOtherLatencyMs field value
      lostSyncCount - the lostSyncCount field value
      isValidator - the isValidator field value
      maxInboundPeerCount - the maxInboundPeerCount field value
      maxOutboundPeerCount - the maxOutboundPeerCount field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static TimeSlicedNodeData decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

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

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

      public static TimeSlicedNodeData fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static TimeSlicedNodeData fromJson(String json)
    • builder

    • toBuilder

    • getAddedAuthenticatedPeers

      public Uint32 getAddedAuthenticatedPeers()
      Value of the addedAuthenticatedPeers field.
      Returns:
      the addedAuthenticatedPeers field value
    • getDroppedAuthenticatedPeers

      public Uint32 getDroppedAuthenticatedPeers()
      Value of the droppedAuthenticatedPeers field.
      Returns:
      the droppedAuthenticatedPeers field value
    • getTotalInboundPeerCount

      public Uint32 getTotalInboundPeerCount()
      Value of the totalInboundPeerCount field.
      Returns:
      the totalInboundPeerCount field value
    • getTotalOutboundPeerCount

      public Uint32 getTotalOutboundPeerCount()
      Value of the totalOutboundPeerCount field.
      Returns:
      the totalOutboundPeerCount field value
    • getP75SCPFirstToSelfLatencyMs

      public Uint32 getP75SCPFirstToSelfLatencyMs()
      Value of the p75SCPFirstToSelfLatencyMs field.
      Returns:
      the p75SCPFirstToSelfLatencyMs field value
    • getP75SCPSelfToOtherLatencyMs

      public Uint32 getP75SCPSelfToOtherLatencyMs()
      Value of the p75SCPSelfToOtherLatencyMs field.
      Returns:
      the p75SCPSelfToOtherLatencyMs field value
    • getLostSyncCount

      public Uint32 getLostSyncCount()
      Value of the lostSyncCount field.
      Returns:
      the lostSyncCount field value
    • getIsValidator

      public Boolean getIsValidator()
      Value of the isValidator field.
      Returns:
      the isValidator field value
    • getMaxInboundPeerCount

      public Uint32 getMaxInboundPeerCount()
      Value of the maxInboundPeerCount field.
      Returns:
      the maxInboundPeerCount field value
    • getMaxOutboundPeerCount

      public Uint32 getMaxOutboundPeerCount()
      Value of the maxOutboundPeerCount field.
      Returns:
      the maxOutboundPeerCount field value
    • setAddedAuthenticatedPeers

      public void setAddedAuthenticatedPeers(Uint32 addedAuthenticatedPeers)
      Value of the addedAuthenticatedPeers field.
      Parameters:
      addedAuthenticatedPeers - the addedAuthenticatedPeers field value
    • setDroppedAuthenticatedPeers

      public void setDroppedAuthenticatedPeers(Uint32 droppedAuthenticatedPeers)
      Value of the droppedAuthenticatedPeers field.
      Parameters:
      droppedAuthenticatedPeers - the droppedAuthenticatedPeers field value
    • setTotalInboundPeerCount

      public void setTotalInboundPeerCount(Uint32 totalInboundPeerCount)
      Value of the totalInboundPeerCount field.
      Parameters:
      totalInboundPeerCount - the totalInboundPeerCount field value
    • setTotalOutboundPeerCount

      public void setTotalOutboundPeerCount(Uint32 totalOutboundPeerCount)
      Value of the totalOutboundPeerCount field.
      Parameters:
      totalOutboundPeerCount - the totalOutboundPeerCount field value
    • setP75SCPFirstToSelfLatencyMs

      public void setP75SCPFirstToSelfLatencyMs(Uint32 p75SCPFirstToSelfLatencyMs)
      Value of the p75SCPFirstToSelfLatencyMs field.
      Parameters:
      p75SCPFirstToSelfLatencyMs - the p75SCPFirstToSelfLatencyMs field value
    • setP75SCPSelfToOtherLatencyMs

      public void setP75SCPSelfToOtherLatencyMs(Uint32 p75SCPSelfToOtherLatencyMs)
      Value of the p75SCPSelfToOtherLatencyMs field.
      Parameters:
      p75SCPSelfToOtherLatencyMs - the p75SCPSelfToOtherLatencyMs field value
    • setLostSyncCount

      public void setLostSyncCount(Uint32 lostSyncCount)
      Value of the lostSyncCount field.
      Parameters:
      lostSyncCount - the lostSyncCount field value
    • setIsValidator

      public void setIsValidator(Boolean isValidator)
      Value of the isValidator field.
      Parameters:
      isValidator - the isValidator field value
    • setMaxInboundPeerCount

      public void setMaxInboundPeerCount(Uint32 maxInboundPeerCount)
      Value of the maxInboundPeerCount field.
      Parameters:
      maxInboundPeerCount - the maxInboundPeerCount field value
    • setMaxOutboundPeerCount

      public void setMaxOutboundPeerCount(Uint32 maxOutboundPeerCount)
      Value of the maxOutboundPeerCount field.
      Parameters:
      maxOutboundPeerCount - the maxOutboundPeerCount field value
    • 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