# 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)

*** ** * ** ***


```
public class PageKeyedDataSource.LoadParams<Key extends Object>
```

<br />

*** ** * ** ***

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

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

| Parameters |
|---|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html>` | Type of data used to query pages. |

## Summary

| ### Public fields |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull Key` | `https://developer.android.com/reference/androidx/paging/PageKeyedDataSource.LoadParams#key()` **This field is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource |
| `final int` | `https://developer.android.com/reference/androidx/paging/PageKeyedDataSource.LoadParams#requestedLoadSize()` **This field is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource |

| ### Public constructors |
|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html> [LoadParams](https://developer.android.com/reference/androidx/paging/PageKeyedDataSource.LoadParams#LoadParams(kotlin.Any,kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/NonNull Key key, int requestedLoadSize)` **This method is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource |

## Public fields

### key

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)

```
public final @NonNull Key key
```

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

Load items before/after this key.

Returned data must begin directly adjacent to this position.

### requestedLoadSize

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)

```
public final int requestedLoadSize
```

> [!CAUTION]
> **This field is deprecated.**   
> PageKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```
> 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.

## Public constructors

### LoadParams

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

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

| Parameters |
|---|---|
| `<Key extends https://developer.android.com/reference/java/lang/Object.html>` | Type of data used to query pages. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Key key` | Load items before/after this key. Returned data must begin directly adjacent to this position. |
| `int requestedLoadSize` | 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. |