Interface StorageReference

All Superinterfaces:
Comparable<StorageValue>, io.hotmoka.marshalling.api.Marshallable, Serializable, StorageValue

public interface StorageReference extends StorageValue, Serializable
A reference to an object of class type that can be stored in the the store of a Hotmoka node. It knows the transaction that created the object. Objects created during the same transaction are disambiguated by a progressive number.
  • Method Details

    • getTransaction

      TransactionReference getTransaction()
      Yields the transaction that created the object.
      Returns:
      the transaction that created the object
    • getProgressive

      BigInteger getProgressive()
      Yields the progressive number of the object among those that have been created during the same transaction.
      Returns:
      the progressive number of the object among those that have been created during the same transaction
    • toByteArrayWithoutSelector

      byte[] toByteArrayWithoutSelector()
      Transforms this object into a byte array, without the selector that, instead, gets added by io.hotmoka.marshalling.api.Marshallable#toByteArray().
      Returns:
      the byte array resulting from marshalling this object
    • intoWithoutSelector

      void intoWithoutSelector(io.hotmoka.marshalling.api.MarshallingContext context) throws IOException
      Marshals this object into the given context, without the selector that, instead, gets added by Marshallable.into(MarshallingContext).
      Parameters:
      context - the context
      Throws:
      IOException - if the object cannot be marshalled