Package org.stellar.sdk.xdr
Class SorobanResources
java.lang.Object
org.stellar.sdk.xdr.SorobanResources
- All Implemented Interfaces:
XdrElement
SorobanResources's original definition in the XDR file is:
struct SorobanResources
{
// The ledger footprint of the transaction.
LedgerFootprint footprint;
// The maximum number of instructions this transaction can use
uint32 instructions;
// The maximum number of bytes this transaction can read from disk backed entries
uint32 diskReadBytes;
// The maximum number of bytes this transaction can write to ledger
uint32 writeBytes;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSorobanResources(LedgerFootprint footprint, Uint32 instructions, Uint32 diskReadBytes, Uint32 writeBytes) Creates a newSorobanResourcesinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SorobanResourcesdecode(XdrDataInputStream stream) static SorobanResourcesdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SorobanResourcesstatic SorobanResourcesfromXdrBase64(String xdr) static SorobanResourcesfromXdrByteArray(byte[] xdr) Value of thediskReadBytesfield.Value of thefootprintfield.Value of theinstructionsfield.Value of thewriteBytesfield.inthashCode()voidsetDiskReadBytes(Uint32 diskReadBytes) Value of thediskReadBytesfield.voidsetFootprint(LedgerFootprint footprint) Value of thefootprintfield.voidsetInstructions(Uint32 instructions) Value of theinstructionsfield.voidsetWriteBytes(Uint32 writeBytes) Value of thewriteBytesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SorobanResources
public SorobanResources() -
SorobanResources
public SorobanResources(LedgerFootprint footprint, Uint32 instructions, Uint32 diskReadBytes, Uint32 writeBytes) Creates a newSorobanResourcesinstance.- Parameters:
footprint- thefootprintfield valueinstructions- theinstructionsfield valuediskReadBytes- thediskReadBytesfield valuewriteBytes- thewriteBytesfield 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
-
getFootprint
Value of thefootprintfield.- Returns:
- the
footprintfield value
-
getInstructions
Value of theinstructionsfield.- Returns:
- the
instructionsfield value
-
getDiskReadBytes
Value of thediskReadBytesfield.- Returns:
- the
diskReadBytesfield value
-
getWriteBytes
Value of thewriteBytesfield.- Returns:
- the
writeBytesfield value
-
setFootprint
Value of thefootprintfield.- Parameters:
footprint- thefootprintfield value
-
setInstructions
Value of theinstructionsfield.- Parameters:
instructions- theinstructionsfield value
-
setDiskReadBytes
Value of thediskReadBytesfield.- Parameters:
diskReadBytes- thediskReadBytesfield value
-
setWriteBytes
Value of thewriteBytesfield.- Parameters:
writeBytes- thewriteBytesfield value
-
equals
-
hashCode
public int hashCode() -
toString
-