redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at redis.clients.jedis.Protocol.process(Protocol.java:79) at redis.clients.jedis.Protocol.read(Protocol.java:131) at redis.clients.jedis.Connection.getIntegerReply(Connection.java:188) at redis.clients.jedis.Jedis.sismember(Jedis.java:1266)
public Long sadd(final String key, final String... members) { checkIsInMulti(); client.sadd(key, members); return client.getIntegerReply(); }
client是redis.clients.jedis.Client.java的实例,继承关系如下: public class Client extends BinaryClient implements Commands; public class BinaryClient extends Connection;
public class ReadFileByLines { public static void main(String[] args) { try { //1.打开一个file File file = new File("E:/test.txt"); //2.InputStreamReader<-FileInputStream<-file FileInputStream fis = new FileInputStream(file); InputStreamReader is = new InputStreamReader(fis); //3.用BufferedReader(<-InputStreamReader)的readLine()方法读取 BufferedReader br = new BufferedReader(is);