Enum BlockStatus

    • Enum Constant Detail

      • Needed

        public static final BlockStatus Needed
        This status indicates that we still need this block and have not yet assigned it to a peer.
      • Requested

        public static final BlockStatus Requested
        This status indicates that we still need this block and have requested it from a peer.
      • Stored

        public static final BlockStatus Stored
        This status indicates that we received and stored the bytes of this piece but the Piece as an entirety needs to be on this status before we can verify that the received information is correct.
      • Verified

        public static final BlockStatus Verified
        The block information we have is verified to match the expected data.
    • Method Detail

      • values

        public static BlockStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BlockStatus c : BlockStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BlockStatus valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null