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

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

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

# CapacityPolicy

[common]\
enum [CapacityPolicy](index.md) : [Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)&lt;[CapacityPolicy](index.md)&gt; 

How admission accounts for the model's capacity beyond the session cap: [SLOT_CAP](SLOT_CAP/index.md) admits up to the session ceiling and never reads the model's capacity; [NO_EVICT](NO_EVICT/index.md) admits a request only while the free capacity covers every active session's remaining need plus this one's whole need; [PREEMPT_LAST](PREEMPT_LAST/index.md) admits while the free capacity covers the next step and lets the model set a session aside when it runs short, to re-admit it later.

## Entries

| | |
|---|---|
| [SLOT_CAP](SLOT_CAP/index.md) | [common]<br>[SLOT_CAP](SLOT_CAP/index.md) |
| [NO_EVICT](NO_EVICT/index.md) | [common]<br>[NO_EVICT](NO_EVICT/index.md) |
| [PREEMPT_LAST](PREEMPT_LAST/index.md) | [common]<br>[PREEMPT_LAST](PREEMPT_LAST/index.md) |

## Properties

| Name | Summary |
|---|---|
| [code](code.md) | [common]<br>val [code](code.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) |
| [name](../PaddingSide/LEFT/index.md) | [common]<br>val [name](../PaddingSide/LEFT/index.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [ordinal](../PaddingSide/LEFT/index.md) | [common]<br>val [ordinal](../PaddingSide/LEFT/index.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) |

## Functions

| Name | Summary |
|---|---|
| [valueOf](valueOf.md) | [common]<br>fun [valueOf](valueOf.md)(value: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [CapacityPolicy](index.md)<br>Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) |
| [values](values.md) | [common]<br>fun [values](values.md)(): [Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)&lt;[CapacityPolicy](index.md)&gt;<br>Returns an array containing the constants of this enum type, in the order they're declared. |