# ServerClientMigrationEnvironment

sealed class ServerClientMigrationEnvironment

Defines migration mechanism for different versions of:

- Protocols

- IPC Schemas

Migration should be done using migration function.

#### See also

ServerClientMigrationEnvironment.IPCVersionMigrationEnvironment
ServerClientMigrationEnvironment.ProtocolVersionMigrationEnvironment

#### Inheritors

IPCVersionMigrationEnvironment
ProtocolVersionMigrationEnvironment

## Types

IPCVersionMigrationEnvironment
Link copied to clipboard
abstract class IPCVersionMigrationEnvironment : ServerClientMigrationEnvironment

Defines migration based on version of AIDL interface.

ProtocolVersionMigrationEnvironment
Link copied to clipboard
abstract class ProtocolVersionMigrationEnvironment(val protocolName: String) : ServerClientMigrationEnvironment

Defines migrations based on concrete protocol version.

## Functions

forExactVersion
Link copied to clipboard
fun <ReturnType> forExactVersion(version: String, migration: () -> ReturnType)

Performs migration only for one specific version

forVersions
Link copied to clipboard
fun <ReturnType> forVersions(vararg versions: String, migration: (String) -> ReturnType): ReturnType?
getVersion
Link copied to clipboard
abstract fun getVersion(): String?
notForVersions
Link copied to clipboard
fun <ReturnType> notForVersions(vararg versions: String, migration: (String) -> ReturnType): ReturnType?

Performs migration for all the versions except versions