use of com.sun.corba.ee.spi.folb.SocketInfo in project Payara by payara.
the class RoundRobinPolicy method filterSocketInfos.
// Copy list, changing any type that does not start with SSL to CLEAR_TEXT.
private List<SocketInfo> filterSocketInfos(List<SocketInfo> sis) {
final List<SocketInfo> result = new ArrayList<SocketInfo>();
for (SocketInfo si : sis) {
final String newType = si.type().startsWith(SSL) ? si.type() : CLEAR_TEXT;
final SocketInfo siCopy = new SocketInfo(newType, si.host(), si.port());
result.add(siCopy);
}
return result;
}
use of com.sun.corba.ee.spi.folb.SocketInfo in project Payara by payara.
the class RoundRobinPolicy method filterClusterInfo.
private List<ClusterInstanceInfo> filterClusterInfo(List<ClusterInstanceInfo> info) {
boolean isw = isWeighted();
ArrayList<ClusterInstanceInfo> newList = new ArrayList<ClusterInstanceInfo>();
totalWeight = 0;
for (ClusterInstanceInfo clinfo : info) {
final int newWeight = isw ? clinfo.weight() : default_weight;
final List<SocketInfo> newEndpoints = filterSocketInfos(clinfo.endpoints());
final ClusterInstanceInfo newClinfo = new ClusterInstanceInfo(clinfo.name(), newWeight, newEndpoints);
newList.add(newClinfo);
totalWeight += newWeight;
}
return newList;
}
Aggregations