Package org.stellar.sdk.xdr
Class PeerStats
java.lang.Object
org.stellar.sdk.xdr.PeerStats
- All Implemented Interfaces:
XdrElement
PeerStats's original definition in the XDR file is:
struct PeerStats
{
NodeID id;
string versionStr<100>;
uint64 messagesRead;
uint64 messagesWritten;
uint64 bytesRead;
uint64 bytesWritten;
uint64 secondsConnected;
uint64 uniqueFloodBytesRecv;
uint64 duplicateFloodBytesRecv;
uint64 uniqueFetchBytesRecv;
uint64 duplicateFetchBytesRecv;
uint64 uniqueFloodMessageRecv;
uint64 duplicateFloodMessageRecv;
uint64 uniqueFetchMessageRecv;
uint64 duplicateFetchMessageRecv;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionPeerStats(NodeID id, XdrString versionStr, Uint64 messagesRead, Uint64 messagesWritten, Uint64 bytesRead, Uint64 bytesWritten, Uint64 secondsConnected, Uint64 uniqueFloodBytesRecv, Uint64 duplicateFloodBytesRecv, Uint64 uniqueFetchBytesRecv, Uint64 duplicateFetchBytesRecv, Uint64 uniqueFloodMessageRecv, Uint64 duplicateFloodMessageRecv, Uint64 uniqueFetchMessageRecv, Uint64 duplicateFetchMessageRecv) Creates a newPeerStatsinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic PeerStats.PeerStatsBuilderbuilder()static PeerStatsdecode(XdrDataInputStream stream) static PeerStatsdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic PeerStatsstatic PeerStatsfromXdrBase64(String xdr) static PeerStatsfromXdrByteArray(byte[] xdr) Value of thebytesReadfield.Value of thebytesWrittenfield.Value of theduplicateFetchBytesRecvfield.Value of theduplicateFetchMessageRecvfield.Value of theduplicateFloodBytesRecvfield.Value of theduplicateFloodMessageRecvfield.getId()Value of theidfield.Value of themessagesReadfield.Value of themessagesWrittenfield.Value of thesecondsConnectedfield.Value of theuniqueFetchBytesRecvfield.Value of theuniqueFetchMessageRecvfield.Value of theuniqueFloodBytesRecvfield.Value of theuniqueFloodMessageRecvfield.Value of theversionStrfield.inthashCode()voidsetBytesRead(Uint64 bytesRead) Value of thebytesReadfield.voidsetBytesWritten(Uint64 bytesWritten) Value of thebytesWrittenfield.voidsetDuplicateFetchBytesRecv(Uint64 duplicateFetchBytesRecv) Value of theduplicateFetchBytesRecvfield.voidsetDuplicateFetchMessageRecv(Uint64 duplicateFetchMessageRecv) Value of theduplicateFetchMessageRecvfield.voidsetDuplicateFloodBytesRecv(Uint64 duplicateFloodBytesRecv) Value of theduplicateFloodBytesRecvfield.voidsetDuplicateFloodMessageRecv(Uint64 duplicateFloodMessageRecv) Value of theduplicateFloodMessageRecvfield.voidValue of theidfield.voidsetMessagesRead(Uint64 messagesRead) Value of themessagesReadfield.voidsetMessagesWritten(Uint64 messagesWritten) Value of themessagesWrittenfield.voidsetSecondsConnected(Uint64 secondsConnected) Value of thesecondsConnectedfield.voidsetUniqueFetchBytesRecv(Uint64 uniqueFetchBytesRecv) Value of theuniqueFetchBytesRecvfield.voidsetUniqueFetchMessageRecv(Uint64 uniqueFetchMessageRecv) Value of theuniqueFetchMessageRecvfield.voidsetUniqueFloodBytesRecv(Uint64 uniqueFloodBytesRecv) Value of theuniqueFloodBytesRecvfield.voidsetUniqueFloodMessageRecv(Uint64 uniqueFloodMessageRecv) Value of theuniqueFloodMessageRecvfield.voidsetVersionStr(XdrString versionStr) Value of theversionStrfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
PeerStats
public PeerStats() -
PeerStats
public PeerStats(NodeID id, XdrString versionStr, Uint64 messagesRead, Uint64 messagesWritten, Uint64 bytesRead, Uint64 bytesWritten, Uint64 secondsConnected, Uint64 uniqueFloodBytesRecv, Uint64 duplicateFloodBytesRecv, Uint64 uniqueFetchBytesRecv, Uint64 duplicateFetchBytesRecv, Uint64 uniqueFloodMessageRecv, Uint64 duplicateFloodMessageRecv, Uint64 uniqueFetchMessageRecv, Uint64 duplicateFetchMessageRecv) Creates a newPeerStatsinstance.- Parameters:
id- theidfield valueversionStr- theversionStrfield valuemessagesRead- themessagesReadfield valuemessagesWritten- themessagesWrittenfield valuebytesRead- thebytesReadfield valuebytesWritten- thebytesWrittenfield valuesecondsConnected- thesecondsConnectedfield valueuniqueFloodBytesRecv- theuniqueFloodBytesRecvfield valueduplicateFloodBytesRecv- theduplicateFloodBytesRecvfield valueuniqueFetchBytesRecv- theuniqueFetchBytesRecvfield valueduplicateFetchBytesRecv- theduplicateFetchBytesRecvfield valueuniqueFloodMessageRecv- theuniqueFloodMessageRecvfield valueduplicateFloodMessageRecv- theduplicateFloodMessageRecvfield valueuniqueFetchMessageRecv- theuniqueFetchMessageRecvfield valueduplicateFetchMessageRecv- theduplicateFetchMessageRecvfield 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
-
getId
Value of theidfield.- Returns:
- the
idfield value
-
getVersionStr
Value of theversionStrfield.- Returns:
- the
versionStrfield value
-
getMessagesRead
Value of themessagesReadfield.- Returns:
- the
messagesReadfield value
-
getMessagesWritten
Value of themessagesWrittenfield.- Returns:
- the
messagesWrittenfield value
-
getBytesRead
Value of thebytesReadfield.- Returns:
- the
bytesReadfield value
-
getBytesWritten
Value of thebytesWrittenfield.- Returns:
- the
bytesWrittenfield value
-
getSecondsConnected
Value of thesecondsConnectedfield.- Returns:
- the
secondsConnectedfield value
-
getUniqueFloodBytesRecv
Value of theuniqueFloodBytesRecvfield.- Returns:
- the
uniqueFloodBytesRecvfield value
-
getDuplicateFloodBytesRecv
Value of theduplicateFloodBytesRecvfield.- Returns:
- the
duplicateFloodBytesRecvfield value
-
getUniqueFetchBytesRecv
Value of theuniqueFetchBytesRecvfield.- Returns:
- the
uniqueFetchBytesRecvfield value
-
getDuplicateFetchBytesRecv
Value of theduplicateFetchBytesRecvfield.- Returns:
- the
duplicateFetchBytesRecvfield value
-
getUniqueFloodMessageRecv
Value of theuniqueFloodMessageRecvfield.- Returns:
- the
uniqueFloodMessageRecvfield value
-
getDuplicateFloodMessageRecv
Value of theduplicateFloodMessageRecvfield.- Returns:
- the
duplicateFloodMessageRecvfield value
-
getUniqueFetchMessageRecv
Value of theuniqueFetchMessageRecvfield.- Returns:
- the
uniqueFetchMessageRecvfield value
-
getDuplicateFetchMessageRecv
Value of theduplicateFetchMessageRecvfield.- Returns:
- the
duplicateFetchMessageRecvfield value
-
setId
Value of theidfield.- Parameters:
id- theidfield value
-
setVersionStr
Value of theversionStrfield.- Parameters:
versionStr- theversionStrfield value
-
setMessagesRead
Value of themessagesReadfield.- Parameters:
messagesRead- themessagesReadfield value
-
setMessagesWritten
Value of themessagesWrittenfield.- Parameters:
messagesWritten- themessagesWrittenfield value
-
setBytesRead
Value of thebytesReadfield.- Parameters:
bytesRead- thebytesReadfield value
-
setBytesWritten
Value of thebytesWrittenfield.- Parameters:
bytesWritten- thebytesWrittenfield value
-
setSecondsConnected
Value of thesecondsConnectedfield.- Parameters:
secondsConnected- thesecondsConnectedfield value
-
setUniqueFloodBytesRecv
Value of theuniqueFloodBytesRecvfield.- Parameters:
uniqueFloodBytesRecv- theuniqueFloodBytesRecvfield value
-
setDuplicateFloodBytesRecv
Value of theduplicateFloodBytesRecvfield.- Parameters:
duplicateFloodBytesRecv- theduplicateFloodBytesRecvfield value
-
setUniqueFetchBytesRecv
Value of theuniqueFetchBytesRecvfield.- Parameters:
uniqueFetchBytesRecv- theuniqueFetchBytesRecvfield value
-
setDuplicateFetchBytesRecv
Value of theduplicateFetchBytesRecvfield.- Parameters:
duplicateFetchBytesRecv- theduplicateFetchBytesRecvfield value
-
setUniqueFloodMessageRecv
Value of theuniqueFloodMessageRecvfield.- Parameters:
uniqueFloodMessageRecv- theuniqueFloodMessageRecvfield value
-
setDuplicateFloodMessageRecv
Value of theduplicateFloodMessageRecvfield.- Parameters:
duplicateFloodMessageRecv- theduplicateFloodMessageRecvfield value
-
setUniqueFetchMessageRecv
Value of theuniqueFetchMessageRecvfield.- Parameters:
uniqueFetchMessageRecv- theuniqueFetchMessageRecvfield value
-
setDuplicateFetchMessageRecv
Value of theduplicateFetchMessageRecvfield.- Parameters:
duplicateFetchMessageRecv- theduplicateFetchMessageRecvfield value
-
equals
-
hashCode
public int hashCode() -
toString
-