Class StaticReplicationController
- java.lang.Object
-
- uk.co.ractf.polaris.controller.replication.StaticReplicationController
-
- All Implemented Interfaces:
ReplicationController
public class StaticReplicationController extends java.lang.Object implements ReplicationController
An implementation ofReplicationController
that will ensure there is always a static number ofInstance
s
-
-
Constructor Summary
Constructors Constructor Description StaticReplicationController(uk.co.ractf.polaris.api.deployment.StaticReplication staticReplication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getScaleAmount(java.util.List<uk.co.ractf.polaris.api.instance.Instance> instances, ClusterState clusterState)
Calculate how many instances need scheduling or descheduling based on the current state of the cluster.
-
-
-
Method Detail
-
getScaleAmount
public int getScaleAmount(java.util.List<uk.co.ractf.polaris.api.instance.Instance> instances, ClusterState clusterState)
Description copied from interface:ReplicationController
Calculate how many instances need scheduling or descheduling based on the current state of the cluster.- Specified by:
getScaleAmount
in interfaceReplicationController
- Parameters:
instances
- the current instance listclusterState
- the cluster state- Returns:
- the amount to scale by
-
-