java.lang.Object
java.lang.Record
software.sava.core.accounts.sysvar.EpochRewards
- All Implemented Interfaces:
Borsh,Serializable
public record EpochRewards(PublicKey address, long distributionStartingBlockHeight, long numPartitions, byte[] parentBlockHash, BigInteger totalPoints, long totalRewards, long distributedRewards, boolean active)
extends Record
implements Borsh
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.sava.core.borsh.Borsh
Borsh.Enum, Borsh.Factory<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final BiFunction<PublicKey, byte[], EpochRewards> -
Constructor Summary
ConstructorsConstructorDescriptionEpochRewards(PublicKey address, long distributionStartingBlockHeight, long numPartitions, byte[] parentBlockHash, BigInteger totalPoints, long totalRewards, long distributedRewards, boolean active) Creates an instance of aEpochRewardsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.address()Returns the value of theaddressrecord component.longReturns the value of thedistributedRewardsrecord component.longReturns the value of thedistributionStartingBlockHeightrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intl()longReturns the value of thenumPartitionsrecord component.byte[]Returns the value of theparentBlockHashrecord component.static EpochRewardsread(byte[] data) static EpochRewardsread(byte[] data, int offset) static EpochRewardsstatic EpochRewardsfinal StringtoString()Returns a string representation of this record class.Returns the value of thetotalPointsrecord component.longReturns the value of thetotalRewardsrecord component.intwrite(byte[] data, int offset) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.borsh.Borsh
writeOptionalMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, write
-
Field Details
-
BYTES
public static final int BYTES- See Also:
-
FACTORY
-
-
Constructor Details
-
EpochRewards
public EpochRewards(PublicKey address, long distributionStartingBlockHeight, long numPartitions, byte[] parentBlockHash, BigInteger totalPoints, long totalRewards, long distributedRewards, boolean active) Creates an instance of aEpochRewardsrecord class.- Parameters:
address- the value for theaddressrecord componentdistributionStartingBlockHeight- the value for thedistributionStartingBlockHeightrecord componentnumPartitions- the value for thenumPartitionsrecord componentparentBlockHash- the value for theparentBlockHashrecord componenttotalPoints- the value for thetotalPointsrecord componenttotalRewards- the value for thetotalRewardsrecord componentdistributedRewards- the value for thedistributedRewardsrecord componentactive- the value for theactiverecord component
-
-
Method Details
-
read
-
read
-
read
-
read
-
write
public int write(byte[] data, int offset) - Specified by:
writein interfaceSerializable
-
l
public int l()- Specified by:
lin interfaceSerializable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
distributionStartingBlockHeight
public long distributionStartingBlockHeight()Returns the value of thedistributionStartingBlockHeightrecord component.- Returns:
- the value of the
distributionStartingBlockHeightrecord component
-
numPartitions
public long numPartitions()Returns the value of thenumPartitionsrecord component.- Returns:
- the value of the
numPartitionsrecord component
-
parentBlockHash
public byte[] parentBlockHash()Returns the value of theparentBlockHashrecord component.- Returns:
- the value of the
parentBlockHashrecord component
-
totalPoints
Returns the value of thetotalPointsrecord component.- Returns:
- the value of the
totalPointsrecord component
-
totalRewards
public long totalRewards()Returns the value of thetotalRewardsrecord component.- Returns:
- the value of the
totalRewardsrecord component
-
distributedRewards
public long distributedRewards()Returns the value of thedistributedRewardsrecord component.- Returns:
- the value of the
distributedRewardsrecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-