Package com.hazelcast.config.tpc
Class TpcConfig
- java.lang.Object
-
- com.hazelcast.config.tpc.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()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getEventloopCount()
Gets the number of eventloops.int
hashCode()
boolean
isEnabled()
Gets the enabled flag which defines TPC is enabled or not.TpcConfig
setEnabled(boolean enabled)
Sets the enabled flag which defines TPC is enabled or not.TpcConfig
setEventloopCount(int eventloopCount)
In TPC, everything is done in eventloops.java.lang.String
toString()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-