Package org.stellar.sdk.xdr
Class TimeSlicedNodeData
java.lang.Object
org.stellar.sdk.xdr.TimeSlicedNodeData
- All Implemented Interfaces:
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;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionTimeSlicedNodeData(Uint32 addedAuthenticatedPeers, Uint32 droppedAuthenticatedPeers, Uint32 totalInboundPeerCount, Uint32 totalOutboundPeerCount, Uint32 p75SCPFirstToSelfLatencyMs, Uint32 p75SCPSelfToOtherLatencyMs, Uint32 lostSyncCount, Boolean isValidator, Uint32 maxInboundPeerCount, Uint32 maxOutboundPeerCount) Creates a newTimeSlicedNodeDatainstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static TimeSlicedNodeDatadecode(XdrDataInputStream stream) static TimeSlicedNodeDatadecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic TimeSlicedNodeDatastatic TimeSlicedNodeDatafromXdrBase64(String xdr) static TimeSlicedNodeDatafromXdrByteArray(byte[] xdr) Value of theaddedAuthenticatedPeersfield.Value of thedroppedAuthenticatedPeersfield.Value of theisValidatorfield.Value of thelostSyncCountfield.Value of themaxInboundPeerCountfield.Value of themaxOutboundPeerCountfield.Value of thep75SCPFirstToSelfLatencyMsfield.Value of thep75SCPSelfToOtherLatencyMsfield.Value of thetotalInboundPeerCountfield.Value of thetotalOutboundPeerCountfield.inthashCode()voidsetAddedAuthenticatedPeers(Uint32 addedAuthenticatedPeers) Value of theaddedAuthenticatedPeersfield.voidsetDroppedAuthenticatedPeers(Uint32 droppedAuthenticatedPeers) Value of thedroppedAuthenticatedPeersfield.voidsetIsValidator(Boolean isValidator) Value of theisValidatorfield.voidsetLostSyncCount(Uint32 lostSyncCount) Value of thelostSyncCountfield.voidsetMaxInboundPeerCount(Uint32 maxInboundPeerCount) Value of themaxInboundPeerCountfield.voidsetMaxOutboundPeerCount(Uint32 maxOutboundPeerCount) Value of themaxOutboundPeerCountfield.voidsetP75SCPFirstToSelfLatencyMs(Uint32 p75SCPFirstToSelfLatencyMs) Value of thep75SCPFirstToSelfLatencyMsfield.voidsetP75SCPSelfToOtherLatencyMs(Uint32 p75SCPSelfToOtherLatencyMs) Value of thep75SCPSelfToOtherLatencyMsfield.voidsetTotalInboundPeerCount(Uint32 totalInboundPeerCount) Value of thetotalInboundPeerCountfield.voidsetTotalOutboundPeerCount(Uint32 totalOutboundPeerCount) Value of thetotalOutboundPeerCountfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
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 newTimeSlicedNodeDatainstance.- Parameters:
addedAuthenticatedPeers- theaddedAuthenticatedPeersfield valuedroppedAuthenticatedPeers- thedroppedAuthenticatedPeersfield valuetotalInboundPeerCount- thetotalInboundPeerCountfield valuetotalOutboundPeerCount- thetotalOutboundPeerCountfield valuep75SCPFirstToSelfLatencyMs- thep75SCPFirstToSelfLatencyMsfield valuep75SCPSelfToOtherLatencyMs- thep75SCPSelfToOtherLatencyMsfield valuelostSyncCount- thelostSyncCountfield valueisValidator- theisValidatorfield valuemaxInboundPeerCount- themaxInboundPeerCountfield valuemaxOutboundPeerCount- themaxOutboundPeerCountfield 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
-
getAddedAuthenticatedPeers
Value of theaddedAuthenticatedPeersfield.- Returns:
- the
addedAuthenticatedPeersfield value
-
getDroppedAuthenticatedPeers
Value of thedroppedAuthenticatedPeersfield.- Returns:
- the
droppedAuthenticatedPeersfield value
-
getTotalInboundPeerCount
Value of thetotalInboundPeerCountfield.- Returns:
- the
totalInboundPeerCountfield value
-
getTotalOutboundPeerCount
Value of thetotalOutboundPeerCountfield.- Returns:
- the
totalOutboundPeerCountfield value
-
getP75SCPFirstToSelfLatencyMs
Value of thep75SCPFirstToSelfLatencyMsfield.- Returns:
- the
p75SCPFirstToSelfLatencyMsfield value
-
getP75SCPSelfToOtherLatencyMs
Value of thep75SCPSelfToOtherLatencyMsfield.- Returns:
- the
p75SCPSelfToOtherLatencyMsfield value
-
getLostSyncCount
Value of thelostSyncCountfield.- Returns:
- the
lostSyncCountfield value
-
getIsValidator
Value of theisValidatorfield.- Returns:
- the
isValidatorfield value
-
getMaxInboundPeerCount
Value of themaxInboundPeerCountfield.- Returns:
- the
maxInboundPeerCountfield value
-
getMaxOutboundPeerCount
Value of themaxOutboundPeerCountfield.- Returns:
- the
maxOutboundPeerCountfield value
-
setAddedAuthenticatedPeers
Value of theaddedAuthenticatedPeersfield.- Parameters:
addedAuthenticatedPeers- theaddedAuthenticatedPeersfield value
-
setDroppedAuthenticatedPeers
Value of thedroppedAuthenticatedPeersfield.- Parameters:
droppedAuthenticatedPeers- thedroppedAuthenticatedPeersfield value
-
setTotalInboundPeerCount
Value of thetotalInboundPeerCountfield.- Parameters:
totalInboundPeerCount- thetotalInboundPeerCountfield value
-
setTotalOutboundPeerCount
Value of thetotalOutboundPeerCountfield.- Parameters:
totalOutboundPeerCount- thetotalOutboundPeerCountfield value
-
setP75SCPFirstToSelfLatencyMs
Value of thep75SCPFirstToSelfLatencyMsfield.- Parameters:
p75SCPFirstToSelfLatencyMs- thep75SCPFirstToSelfLatencyMsfield value
-
setP75SCPSelfToOtherLatencyMs
Value of thep75SCPSelfToOtherLatencyMsfield.- Parameters:
p75SCPSelfToOtherLatencyMs- thep75SCPSelfToOtherLatencyMsfield value
-
setLostSyncCount
Value of thelostSyncCountfield.- Parameters:
lostSyncCount- thelostSyncCountfield value
-
setIsValidator
Value of theisValidatorfield.- Parameters:
isValidator- theisValidatorfield value
-
setMaxInboundPeerCount
Value of themaxInboundPeerCountfield.- Parameters:
maxInboundPeerCount- themaxInboundPeerCountfield value
-
setMaxOutboundPeerCount
Value of themaxOutboundPeerCountfield.- Parameters:
maxOutboundPeerCount- themaxOutboundPeerCountfield value
-
equals
-
hashCode
public int hashCode() -
toString
-