/** * Sets the prioritized list of data nodes, either ELECTABLE or SECONDARY * members, used to select a node from which to obtain log files for the * NetworkRestore operation. If a list is supplied, NetworkRestore will * only use nodes from this list, trying each one in order. * * <p> The default value is null. If a null value is configured for * NetworkRestore, it will choose the least busy data node with a current * set of logs, as the provider of log files. * * @param providers the list of data nodes in priority order, or null * * @return this */ public NetworkRestoreConfig setLogProviders(List<ReplicationNode> providers) { setLogProvidersVoid(providers); return this; }
/** * @hidden * The void return setter for use by Bean editors. */ public void setReceiveBufferSizeVoid(int receiveBufferSize) { setReceiveBufferSize(receiveBufferSize); }
/** * If true retains obsolete log files, by renaming them instead of deleting * them. The default is "true". * <p> * A renamed file has its <code>.jdb</code> suffix replaced by * <code>.bup</code> and an additional numeric monotonically increasing * numeric suffix. All files that were renamed as part of the same * NetworkRestore attempt will have the same numeric suffix. * <p> * For example, if files 00000001.jdb and files 00000002.jdb were rendered * obsolete, and 4 was the highest suffix in use for this environment when * the operation was initiated, then the files would be renamed as * 00000001.bup.5 and 00000002.bup.5. * * @param retainLogFiles if true retains obsolete log files * * @return this */ public NetworkRestoreConfig setRetainLogFiles(boolean retainLogFiles) { setRetainLogFilesVoid(retainLogFiles); return this; }
NetworkRestoreConfig config = new NetworkRestoreConfig(); config.setRetainLogFiles(false); restore.execute(ile, config); LOGGER.warn("Network restore complete.");
private void run() { while (true) { try { checkParameters(); openAndIdle(); break; } catch (InsufficientLogException ile) { System.err.println("Restoring environment:" + envHome); NetworkRestore networkRestore = new NetworkRestore(); NetworkRestoreConfig config = new NetworkRestoreConfig(); networkRestore.execute(ile, config); System.err.println("Restored environment:" + envHome); createEnv = false; /* The environment has been created. */ continue; } } }
backup = new NetworkBackup (serverSocket, config.getReceiveBufferSize(), envHome, clientNameId, config.getRetainLogFiles(), server.load, minVLSN,
if ((config.getLogProviders() != null) && (config.getLogProviders().size() > 0)) { final Set<String> memberNames = new HashSet<>(); for (ReplicationNode node : logException.getLogProviders()) { memberNames.add(node.getName()); for (ReplicationNode node : config.getLogProviders()) { if (!memberNames.contains(node.getName())) { throw new IllegalArgumentException logProviders = config.getLogProviders(); } else { logProviders = new LinkedList<>(logException.getLogProviders());