Search in sources :

Example 1 with CseServer

use of io.servicecomb.loadbalance.CseServer in project java-chassis by ServiceComb.

the class SimpleTransactionControlFilter method getFilteredListOfServers.

@Override
public List<Server> getFilteredListOfServers(List<Server> servers) {
    List<Server> filteredServers = new ArrayList<>();
    Map<String, String> filterOptions = Configuration.INSTANCE.getFlowsplitFilterOptions(getInvocation().getMicroserviceName());
    for (Server server : servers) {
        if (allowVisit((CseServer) server, filterOptions)) {
            filteredServers.add(server);
        }
    }
    return filteredServers;
}
Also used : CseServer(io.servicecomb.loadbalance.CseServer) Server(com.netflix.loadbalancer.Server) ArrayList(java.util.ArrayList)

Aggregations

Server (com.netflix.loadbalancer.Server)1 CseServer (io.servicecomb.loadbalance.CseServer)1 ArrayList (java.util.ArrayList)1