public class**ConnectionMigrationOptions** extends Object  
A class configuring Cronet's connection migration functionality.

Connection migration stops open connections to servers from being destroyed when the client device switches its L4 connectivity (typically the IP address as a result of using a different network). This is particularly common with mobile devices losing wifi connectivity and switching to cellular data, or vice versa (a.k.a. the parking lot problem). QUIC uses connection identifiers which are independent of the underlying transport layer to make this possible. If the client connects to a new network and wants to preserve the existing connection, they can do so by using a connection identifier the server knows to be a continuation of the existing connection.

The features are only available for QUIC connections and the server needs to support connection migration.  

##### See Also

- [Connection Migration specification](https://www.rfc-editor.org/rfc/rfc9000.html#section-9)  

### Nested Class Summary

|------------|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| class      | [ConnectionMigrationOptions.Builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Builder.html) || Builder for[ConnectionMigrationOptions](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html). |
| @interface | [ConnectionMigrationOptions.Experimental](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Experimental.html) ||                                                                                                                                                                |

### Public Constructor Summary

|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [ConnectionMigrationOptions](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#ConnectionMigrationOptions(org.chromium.net.ConnectionMigrationOptions.Builder))([ConnectionMigrationOptions.Builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Builder.html)builder) |

### Public Method Summary

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[ConnectionMigrationOptions.Builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Builder.html) | [builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#builder())()                                                                           |
| Boolean                                                                                                                                                                  | [getAllowNonDefaultNetworkUsage](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getAllowNonDefaultNetworkUsage())()                             |
| Boolean                                                                                                                                                                  | [getAllowServerMigration](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getAllowServerMigration())()                                           |
| Boolean                                                                                                                                                                  | [getEnableDefaultNetworkMigration](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getEnableDefaultNetworkMigration())()                         |
| Boolean                                                                                                                                                                  | [getEnablePathDegradationMigration](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getEnablePathDegradationMigration())()                       |
| Long                                                                                                                                                                     | [getIdleMigrationPeriodSeconds](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getIdleMigrationPeriodSeconds())()                               |
| Integer                                                                                                                                                                  | [getMaxPathDegradingEagerMigrationsCount](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getMaxPathDegradingEagerMigrationsCount())()           |
| Long                                                                                                                                                                     | [getMaxTimeOnNonDefaultNetworkSeconds](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getMaxTimeOnNonDefaultNetworkSeconds())()                 |
| Integer                                                                                                                                                                  | [getMaxWriteErrorEagerMigrationsCount](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getMaxWriteErrorEagerMigrationsCount())()                 |
| Boolean                                                                                                                                                                  | [getMigrateIdleConnections](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getMigrateIdleConnections())()                                       |
| Boolean                                                                                                                                                                  | [getRetryPreHandshakeErrorsOnAlternateNetwork](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.html#getRetryPreHandshakeErrorsOnAlternateNetwork())() |

### Inherited Method Summary

From class java.lang.Object  

|------------------|---------------------------|
| Object           | clone()                   |
| boolean          | equals(Object arg0)       |
| void             | finalize()                |
| final Class\<?\> | getClass()                |
| int              | hashCode()                |
| final void       | notify()                  |
| final void       | notifyAll()               |
| String           | toString()                |
| final void       | wait(long arg0, int arg1) |
| final void       | wait(long arg0)           |
| final void       | wait()                    |

## Public Constructors

#### public**ConnectionMigrationOptions**([ConnectionMigrationOptions.Builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Builder.html)builder)

<br />

##### Parameters

| builder |   |
|---------|---|

## Public Methods

#### public static[ConnectionMigrationOptions.Builder](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionMigrationOptions.Builder.html)**builder**()

<br />

#### public Boolean**getAllowNonDefaultNetworkUsage**()

<br />

#### public Boolean**getAllowServerMigration**()

<br />

#### public Boolean**getEnableDefaultNetworkMigration**()

<br />

#### public Boolean**getEnablePathDegradationMigration**()

<br />

#### public Long**getIdleMigrationPeriodSeconds**()

<br />

#### public Integer**getMaxPathDegradingEagerMigrationsCount**()

<br />

#### public Long**getMaxTimeOnNonDefaultNetworkSeconds**()

<br />

#### public Integer**getMaxWriteErrorEagerMigrationsCount**()

<br />

#### public Boolean**getMigrateIdleConnections**()

<br />

#### public Boolean**getRetryPreHandshakeErrorsOnAlternateNetwork**()

<br />