---
title: "BatchableState"
sidebar_label: "BatchableState"
description: "Kotlin binding reference: BatchableState."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[BatchableState](index.md)

# BatchableState

[common]\
interface [BatchableState](index.md)

The reads the continuous batcher takes of a session's state, on the engine's thread, every step: the carried load, its ceiling (the headroom admits work) and the units the next step launches (1 for a decode step; a prompt ingested in chunks reports its next chunk's length). Keep them cheap and never raise: a raise is reported and reads as 0.

## Functions

| Name | Summary |
|---|---|
| [capacity](capacity.md) | [common]<br>abstract fun [capacity](capacity.md)(): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [occupancy](occupancy.md) | [common]<br>abstract fun [occupancy](occupancy.md)(): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [stepTokens](stepTokens.md) | [common]<br>open fun [stepTokens](stepTokens.md)(): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |