Class StateRef

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class StateRef
    extends SpecificRecordBase implements SpecificRecord
                        

    StateRef

    • Constructor Detail

      • StateRef

        StateRef()
        Default constructor.
      • StateRef

        StateRef(SecureHash transactionId, Integer index)
        All-args constructor.
        Parameters:
        transactionId - The id of the transaction in which the referenced state was created.
        index - The index of the state in the transaction's outputs in which the referenced state was created.
    • Method Detail

      • setTransactionId

         void setTransactionId(SecureHash value)

        Sets the value of the 'transactionId' field. The id of the transaction in which the referenced state was created.

        Parameters:
        value - the value to set.
      • getIndex

         int getIndex()

        Gets the value of the 'index' field.

      • setIndex

         void setIndex(int value)

        Sets the value of the 'index' field. The index of the state in the transaction's outputs in which the referenced state was created.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<StateRef> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<StateRef> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<StateRef> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static StateRef fromByteBuffer(ByteBuffer b)

        Deserializes a StateRef from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
      • newBuilder

         static StateRef.Builder newBuilder(StateRef other)

        Creates a new StateRef RecordBuilder by copying an existing StateRef instance.

        Parameters:
        other - The existing instance to copy.