NetworkRestoreConfig (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je.rep

## Class NetworkRestoreConfig

- java.lang.Object
- - com.sleepycat.je.rep.NetworkRestoreConfig

-     public class NetworkRestoreConfig
      extends Object

  NetworkRestoreConfig defines the configuration parameters used to configure a NetworkRestore operation.
  See Also:
    `NetworkRestore`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkRestoreConfig()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<ReplicationNode>` | `getLogProviders()` Returns the candidate list of data nodes, either ELECTABLE or SECONDARY members, that may be used to obtain log files.
    `int` | `getReceiveBufferSize()` Returns the size of the receive buffer associated with the socket used to transfer files during the NetworkRestore operation.
    `boolean` | `getRetainLogFiles()` Returns a boolean indicating whether existing log files should be retained or deleted.
    `NetworkRestoreConfig` | `setLogProviders(List<ReplicationNode> providers)` 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.
    `NetworkRestoreConfig` | `setReceiveBufferSize(int receiveBufferSize)` Sets the size of the receive buffer associated with the socket used to transfer files during the NetworkRestore operation.
    `NetworkRestoreConfig` | `setRetainLogFiles(boolean retainLogFiles)` If true retains obsolete log files, by renaming them instead of deleting them.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NetworkRestoreConfig

          public NetworkRestoreConfig()

  - ### Method Detail

    - #### getRetainLogFiles

          public boolean getRetainLogFiles()

      Returns a boolean indicating whether existing log files should be retained or deleted.
      Returns:
        true if log files must be retained

    - #### setRetainLogFiles

          public NetworkRestoreConfig setRetainLogFiles(boolean retainLogFiles)

      If true retains obsolete log files, by renaming them instead of deleting them. The default is "true".

      A renamed file has its `.jdb` suffix replaced by `.bup` 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.

      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.

      Parameters:
        `retainLogFiles` - if true retains obsolete log files
      Returns:
        this

    - #### getReceiveBufferSize

          public int getReceiveBufferSize()

      Returns the size of the receive buffer associated with the socket used to transfer files during the NetworkRestore operation.

    - #### setReceiveBufferSize

          public NetworkRestoreConfig setReceiveBufferSize(int receiveBufferSize)

      Sets the size of the receive buffer associated with the socket used to transfer files during the NetworkRestore operation.

      Note that if the size specified is larger than the operating system constrained maximum, it will be limited to this maximum value. For example, on Linux you may need to set the kernel parameter: net.core.rmem_max property using the command: sysctl -w net.core.rmem_max=1048576 to increase the operating system imposed limit.

      Parameters:
        `receiveBufferSize` - the size of the receive buffer. If it's zero, the operating system default value is used.

    - #### getLogProviders

          public List<ReplicationNode> getLogProviders()

      Returns the candidate list of data nodes, either ELECTABLE or SECONDARY members, that may be used to obtain log files.
      Returns:
        the list of data nodes in priority order, or null

    - #### setLogProviders

          public NetworkRestoreConfig setLogProviders(List<ReplicationNode> providers)

      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.

      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.

      Parameters:
        `providers` - the list of data nodes in priority order, or null
      Returns:
        this

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.