Class InstanceState

    • Method Detail

      • code

        public final Integer code()

        The state of the instance as a 16-bit unsigned integer.

        The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

        The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

        The valid values for instance-state-code will all be in the range of the low byte and they are:

        • 0 : pending

        • 16 : running

        • 32 : shutting-down

        • 48 : terminated

        • 64 : stopping

        • 80 : stopped

        You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

        Returns:
        The state of the instance as a 16-bit unsigned integer.

        The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

        The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

        The valid values for instance-state-code will all be in the range of the low byte and they are:

        • 0 : pending

        • 16 : running

        • 32 : shutting-down

        • 48 : terminated

        • 64 : stopping

        • 80 : stopped

        You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)