Class ImmutableOutputStatus

    • Method Detail

      • errorCount

        public int errorCount()
        The number of errors.
        Specified by:
        errorCount in interface OutputStatus
      • forwarded

        public int forwarded()
        The number of messages forwarded.
        Specified by:
        forwarded in interface OutputStatus
      • received

        public int received()
        The number of messages received.
        Specified by:
        received in interface OutputStatus
      • retries

        public int retries()
        The number of messages retransmitted.
        Specified by:
        retries in interface OutputStatus
      • withErrorCount

        public final ImmutableOutputStatus withErrorCount​(int value)
        Copy the current immutable object by setting a value for the errorCount attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for errorCount
        Returns:
        A modified copy of the this object
      • withForwarded

        public final ImmutableOutputStatus withForwarded​(int value)
        Copy the current immutable object by setting a value for the forwarded attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for forwarded
        Returns:
        A modified copy of the this object
      • withReceived

        public final ImmutableOutputStatus withReceived​(int value)
        Copy the current immutable object by setting a value for the received attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for received
        Returns:
        A modified copy of the this object
      • withRetries

        public final ImmutableOutputStatus withRetries​(int value)
        Copy the current immutable object by setting a value for the retries attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for retries
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableOutputStatus that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: errorCount, forwarded, received, retries.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value OutputStatus with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableOutputStatus copyOf​(OutputStatus instance)
        Creates an immutable copy of a OutputStatus value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable OutputStatus instance