
package org.tio.sitexxx.service.service;

import org.redisson.connection.ClientConnectionsEntry;
import org.redisson.connection.balancer.RandomLoadBalancer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

public class MyRandomLoadBalancer extends RandomLoadBalancer {
	private static Logger log = LoggerFactory.getLogger(MyRandomLoadBalancer.class);

	@Override
	public ClientConnectionsEntry getEntry(List<ClientConnectionsEntry> clientsCopy) {
		ClientConnectionsEntry test = super.getEntry(clientsCopy);
		log.info(test.getClient().getAddr().getHostString() + ":" + test.getClient().getAddr().getPort());
		return test;
	}

}
