Class NoAdmissionOptimizer$
java.lang.Object
org.apache.pekko.cluster.sharding.internal.NoAdmissionOptimizer$
INTERNAL API
Disabled admission window proportion optimizer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NoAdmissionOptimizer$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.pekko.cluster.sharding.internal.AdmissionOptimizerapply(int initialLimit, org.apache.pekko.cluster.sharding.ClusterShardingSettings.CompositePassivationStrategy.AdmissionOptimizer optimizer) doubleCalculate an adjustment to the proportion of the admission window.voidAn entity was accessed that is already active.voidAn entity was accessed that was passive (needed to be activated).voidupdateLimit(int newLimit) The per-shard limit has been updated.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
NoAdmissionOptimizer$
public NoAdmissionOptimizer$()
-
-
Method Details
-
recordActive
public void recordActive()An entity was accessed that is already active. -
recordPassive
public void recordPassive()An entity was accessed that was passive (needed to be activated). -
updateLimit
public void updateLimit(int newLimit) The per-shard limit has been updated.- Parameters:
newLimit- the new per-shard limit
-
calculateAdjustment
public double calculateAdjustment()Calculate an adjustment to the proportion of the admission window. Can be positive (to grow the window) or negative (to shrink the window). Returns 0.0 if no adjustment should be made.- Returns:
- the adjustment to make to the admission window proportion
-
apply
public static org.apache.pekko.cluster.sharding.internal.AdmissionOptimizer apply(int initialLimit, org.apache.pekko.cluster.sharding.ClusterShardingSettings.CompositePassivationStrategy.AdmissionOptimizer optimizer)
-