Interface ReplicationController
-
- All Known Implementing Classes:
NullReplicationController
,StaticReplicationController
public interface ReplicationController
This interface is used to control how aTask
should replicate itsInstance
s.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ReplicationController
create(uk.co.ractf.polaris.api.deployment.Replication replication)
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
-
create
@Contract("null -> new") static ReplicationController create(uk.co.ractf.polaris.api.deployment.Replication replication)
-
getScaleAmount
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.- Parameters:
instances
- the current instance listclusterState
- the cluster state- Returns:
- the amount to scale by
-
-