All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.phantomthief.failover.impl.WeightFunction Maven / Gradle / Ivy

There is a newer version: 0.1.32
Show newest version
package com.github.phantomthief.failover.impl;

/**
 * @author huangli
 * Created on 2020-01-16
 */
public interface WeightFunction {

    double success(double maxWeight, double minWeight, int priority, double currentOldWeight, T resource);

    double fail(double maxWeight, double minWeight, int priority, double currentOldWeight, T resource);

    boolean needCheck(double maxWeight, double minWeight, int priority, double currentWeight, T resource);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy