Utilisation et contraintes

Le profil décrit le matériel disponible dans un Serveur : calcul, mémoire, stockage et transferts. Les limites de lecture et d’écriture sont indépendantes. Le calcul autorise le lancement des opérations ; il ne raccourcit pas leur durée.

HardwareProfile

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) }
}
Source

src/main/kotlin/dev/nebulastorage/api/hardware/HardwareProfile.kt; editorial/fr.json

43b4d12d69e6033c24fa8c39dac383ef2429b446