Package org.polkadot.types.rpc
Class PeerInfo
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,Codec>
-
- org.polkadot.types.codec.Struct
-
- org.polkadot.types.rpc.PeerInfo
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,Codec>,Codec
public class PeerInfo extends Struct
A system peer info indicator, reported back over RPC- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PeerInfo(java.lang.Object value)
-
Method Summary
Modifier and Type Method Description HashgetBestHash()The best block hash for the peerBlockNumbergetBestNumber()The best block hash for the peerTextgetPeerId()The p2p network id for the peerU32getProtocolVersion()The index of the peer in our listTextgetRoles()The roles of the peer on the network-
Methods inherited from class org.polkadot.types.codec.Struct
builder, eq, getEncodedLength, getField, isEmpty, toArray, toHex, toJson, toString, toU8a, with
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
getBestHash
public Hash getBestHash()
The best block hash for the peer
-
getBestNumber
public BlockNumber getBestNumber()
The best block hash for the peer
-
getPeerId
public Text getPeerId()
The p2p network id for the peer
-
getProtocolVersion
public U32 getProtocolVersion()
The index of the peer in our list
-
getRoles
public Text getRoles()
The roles of the peer on the network
-
-