Verwendung und Grenzen
Ein Profil beschreibt Rechenleistung, Speicher und Transferbudgets eines Servers. Lesen und Schreiben besitzen getrennte Grenzen. Rechenleistung startet Vorgänge, verkürzt aber nicht ihre Rezeptdauer.
HardwareProfile
package dev.nebulastorage.api.hardware
/** Generation compatibility is enforced by the host. Bandwidth is logical resource units per tick; null preserves an unmetered legacy contract. */
class HardwareProfile(
val generation: Int = 1,
val maximumGeneration: Int = 7,
val io: DriveIo? = null,
val networkBandwidth: Long? = null
) {
init {
require(generation in 1..7 && maximumGeneration in generation..7)
require(networkBandwidth == null || networkBandwidth in 1..1_000_000_000L)
}
}
/** Read and write budgets are independent; operations bounds admission events per tick, independent of resource quantity. */
class DriveIo(val read: Long, val write: Long, val operations: Int) {
init { require(read in 1..1_000_000_000L && write in 1..1_000_000_000L && operations in 1..65536) }
}
Quelle
src/main/kotlin/dev/nebulastorage/api/hardware/HardwareProfile.kt; editorial/de.json
43b4d12d69e6033c24fa8c39dac383ef2429b446