Class ENetConfigure.SelectorInfo

    • Method Detail

      • compareTo

        public int compareTo​(ENetConfigure.SelectorInfo selector)
        Compares this object with the specified selector. Returns negative, zero, or positive integer value based on whether this object is <, equal to, or > selector. Comparison is based on on the selector name.
        Specified by:
        compareTo in interface Comparable<ENetConfigure.SelectorInfo>
        Parameters:
        selector - object used in the comparison.
        Returns:
        a negative, zero, or positive integer value.
      • equals

        public boolean equals​(Object o)
        Returns true if this object equals o and false otherwise. Comparison is based on the name, thread type, "is default" flag, thread priority, spin limit and park time.
        Overrides:
        equals in class Object
        Parameters:
        o - comparison object.
        Returns:
        true if o is a SelectorInfo instance with the same settings as this SelectorInfo instance.
      • hashCode

        public int hashCode()
        Returns a hash code for this object. The hash is based on the selector name, thread type, "is default" flag, thread priority, spin limit, and park time.
        Overrides:
        hashCode in class Object
        Returns:
        object hash code.
      • toString

        public String toString()
        Returns a string representation of this selector info.
        Overrides:
        toString in class Object
        Returns:
        object string representation.
      • name

        public String name()
        Returns the unique selector thread name.
        Returns:
        selector thread name.
      • type

        public ThreadType type()
        Returns the ESelector type.
        Returns:
        selector type.
      • isDefault

        public boolean isDefault()
        Returns true if this user-defined selector thread is the default selector.
        Returns:
        true if the default selector thread.
      • priority

        public int priority()
        Returns the selector thread priority.
        Returns:
        thread priority.
      • spinLimit

        public long spinLimit()
        Returns a spin+park ESelector spin limit.
        Returns:
        spin limit.
      • parkTime

        public Duration parkTime()
        Returns the spin+park park time limit.
        Returns:
        park time limit.
      • affinity

        public ThreadAffinityConfigure affinity()
        Returns thread affinity and null if no affinity is set. This affinity is used to associate a thread with a particular CPU.
        Returns:
        thread affinity.