# PageKeyedDataSource.LoadParams

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PageKeyedDataSource.jvmAndAndroid.kt+class:androidx.paging.PageKeyedDataSource.LoadParams) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- android

  ```
  open class PageKeyedDataSource.LoadParams<Key : Any>
  ```

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> PageKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Holder object for inputs to `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource#loadBefore(androidx.paging.PageKeyedDataSource.LoadParams)` and `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource#loadAfter(androidx.paging.PageKeyedDataSource.LoadParams)`.

| Parameters |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of data used to query pages. |

## Summary

| ### Public constructors |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [LoadParams](https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadParams#LoadParams(kotlin.Any,kotlin.Int))(key: Key, requestedLoadSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |

| ### Public properties |
|---|---|---|
| `Key` | `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadParams#key()` **This property is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadParams#requestedLoadSize()` **This property is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |

## Public constructors

### LoadParams

android

```
<Key : Any> [LoadParams](https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadParams#LoadParams(kotlin.Any,kotlin.Int))(key: Key, requestedLoadSize: Int)
```

> [!CAUTION]
> **This function is deprecated.**   
> PageKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

| Parameters |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of data used to query pages. |
| `key: Key` | Load items before/after this key. Returned data must begin directly adjacent to this position. |
| `requestedLoadSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Requested number of items to load. Returned page can be of this size, but it may be altered if that is easier, e.g. a network data source where the backend defines page size. |

## Public properties

### key

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
val key: Key
```

> [!CAUTION]
> **This property is deprecated.**   
> PageKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Load items before/after this key.

Returned data must begin directly adjacent to this position.

### requestedLoadSize

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
val requestedLoadSize: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> PageKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Requested number of items to load.

Returned page can be of this size, but it may be altered if that is easier, e.g. a network data source where the backend defines page size.