comparison src/goodjava/lucene/backup/BackupIndexWriter.java @ 2022:969291201e12

ping lucene backups
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 20 Oct 2025 17:25:47 -0600
parents 1578324d2aac
children
comparison
equal deleted inserted replaced
2021:b8e5d53c4fc9 2022:969291201e12
229 rpc.close(); 229 rpc.close();
230 } 230 }
231 return new BackupIndexWriter(indexWriter,logDir,logTime,domain,name); 231 return new BackupIndexWriter(indexWriter,logDir,logTime,domain,name);
232 } 232 }
233 233
234 // returns failed domain or null
235 public static String ping() throws IOException {
236 if( backupDomains == null ) {
237 logger.error("backupDomains not set");
238 return null;
239 }
240 for( String backupDomain : backupDomains ) {
241 try {
242 Socket socket = BackupServer.clientSocket(backupDomain);
243 socket.close();
244 } catch(ConnectException e) {
245 return backupDomain;
246 }
247 }
248 return null;
249 }
250
234 } 251 }