Interface IStrategy

    • Method Detail

      • prepare

        void prepare​(Map<String,​Object> config)
        Prepare the Strategy for scheduling.
        Parameters:
        config - the cluster configuration
      • schedule

        SchedulingResult schedule​(Cluster schedulingState,
                                  TopologyDetails td)
        This method is invoked to calculate a scheduling for topology td. Cluster will reject any changes that are not for the given topology. Any changes made to the cluster will be committed if the scheduling is successful.

        NOTE: scheduling occurs as a runnable in an interruptable thread. Scheduling should consider being interrupted if long running.

        Parameters:
        schedulingState - the current state of the cluster
        td - the topology to schedule for
        Returns:
        returns a SchedulingResult object containing SchedulingStatus object to indicate whether scheduling is successful.