Mercurial Hosting > luan
comparison src/goodjava/lucene/backup/BackupServer.java @ 2022:969291201e12
ping lucene backups
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 20 Oct 2025 17:25:47 -0600 |
parents | 2dbcc8360a3e |
children |
comparison
equal
deleted
inserted
replaced
2021:b8e5d53c4fc9 | 2022:969291201e12 |
---|---|
159 } | 159 } |
160 | 160 |
161 | 161 |
162 // for client | 162 // for client |
163 | 163 |
164 public static RpcClient rpcClient(String backupDomain) throws IOException { | 164 static Socket clientSocket(String backupDomain) throws IOException { |
165 Socket socket; | 165 Socket socket; |
166 if( BackupServer.cipherSuites == null ) { | 166 if( BackupServer.cipherSuites == null ) { |
167 socket = new Socket(backupDomain,BackupServer.port); | 167 socket = new Socket(backupDomain,BackupServer.port); |
168 } else { | 168 } else { |
169 socket = IoUtils.getSSLSocketFactory().createSocket(backupDomain,BackupServer.port); | 169 socket = IoUtils.getSSLSocketFactory().createSocket(backupDomain,BackupServer.port); |
170 ((SSLSocket)socket).setEnabledCipherSuites(BackupServer.cipherSuites); | 170 ((SSLSocket)socket).setEnabledCipherSuites(BackupServer.cipherSuites); |
171 } | 171 } |
172 return socket; | |
173 } | |
174 | |
175 public static RpcClient rpcClient(String backupDomain) throws IOException { | |
176 Socket socket = clientSocket(backupDomain); | |
172 return new RpcClient(socket); | 177 return new RpcClient(socket); |
173 } | 178 } |
174 | 179 |
175 public static void copyBackupTo(String dirName) throws IOException, RpcException { | 180 public static void copyBackupTo(String dirName) throws IOException, RpcException { |
176 RpcClient rpc = BackupServer.rpcClient("localhost"); | 181 RpcClient rpc = BackupServer.rpcClient("localhost"); |