Class TpcConfig


  • @Beta
    public class TpcConfig
    extends java.lang.Object
    Hazelcast TPC is the next generation of Hazelcast built with thread per core architecture. It's still being developed and everything is subject to change. TPC is disabled by default.
    Since:
    5.3
    • Constructor Summary

      Constructors 
      Constructor Description
      TpcConfig()  
    • Constructor Detail

      • TpcConfig

        public TpcConfig()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Gets the enabled flag which defines TPC is enabled or not.
        Returns:
        true if TPC is enabled
      • setEnabled

        @Nonnull
        public TpcConfig setEnabled​(boolean enabled)
        Sets the enabled flag which defines TPC is enabled or not. Can't return null.
        Parameters:
        enabled - a boolean to enable or disable TPC
        Returns:
        this
      • getEventloopCount

        public int getEventloopCount()
        Gets the number of eventloops.
        Returns:
        the number of eventloops
        See Also:
        Runtime.availableProcessors(), setEventloopCount(int)
      • setEventloopCount

        @Nonnull
        public TpcConfig setEventloopCount​(int eventloopCount)
        In TPC, everything is done in eventloops. This method sets the number eventloops. By default, it's equal to the number of available processors. Can't return null.
        Parameters:
        eventloopCount - the number of eventloops
        Returns:
        this
        Throws:
        java.lang.IllegalArgumentException - if eventloopCount isn't positive
        See Also:
        Runtime.availableProcessors()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object