Package org.stellar.sdk.xdr
Class PersistedSCPStateV1
java.lang.Object
org.stellar.sdk.xdr.PersistedSCPStateV1
- All Implemented Interfaces:
XdrElement
PersistedSCPStateV1's original definition in the XDR file is:
struct PersistedSCPStateV1
{
// Tx sets are saved separately
SCPEnvelope scpEnvelopes<>;
SCPQuorumSet quorumSets<>;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionPersistedSCPStateV1(SCPEnvelope[] scpEnvelopes, SCPQuorumSet[] quorumSets) Creates a newPersistedSCPStateV1instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static PersistedSCPStateV1decode(XdrDataInputStream stream) static PersistedSCPStateV1decode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic PersistedSCPStateV1static PersistedSCPStateV1fromXdrBase64(String xdr) static PersistedSCPStateV1fromXdrByteArray(byte[] xdr) Value of thequorumSetsfield.Value of thescpEnvelopesfield.inthashCode()voidsetQuorumSets(SCPQuorumSet[] quorumSets) Value of thequorumSetsfield.voidsetScpEnvelopes(SCPEnvelope[] scpEnvelopes) Value of thescpEnvelopesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
PersistedSCPStateV1
public PersistedSCPStateV1() -
PersistedSCPStateV1
Creates a newPersistedSCPStateV1instance.- Parameters:
scpEnvelopes- thescpEnvelopesfield valuequorumSets- thequorumSetsfield 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
public static PersistedSCPStateV1 decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getScpEnvelopes
Value of thescpEnvelopesfield.- Returns:
- the
scpEnvelopesfield value
-
getQuorumSets
Value of thequorumSetsfield.- Returns:
- the
quorumSetsfield value
-
setScpEnvelopes
Value of thescpEnvelopesfield.- Parameters:
scpEnvelopes- thescpEnvelopesfield value
-
setQuorumSets
Value of thequorumSetsfield.- Parameters:
quorumSets- thequorumSetsfield value
-
equals
-
hashCode
public int hashCode() -
toString
-