Verwendung und Grenzen
Setzt Mindestwerte für Rechenleistung, logischen Arbeitsspeicher und Mainboard-Generation. Dieser Speicher ist nicht der JVM-Heap. Rezeptenergie und Materialien bleiben erforderlich.
ProductionRequirements
package dev.nebulastorage.api.production
/** Network admission requirements from powered servers. Memory is installed logical bytes, compute is dispatch capacity, generation is the best active motherboard. */
data class ProductionRequirements(val minimumCompute: Long = 0, val minimumMemory: Long = 0, val minimumGeneration: Int = 0) {
init { require(minimumCompute >= 0 && minimumMemory >= 0 && minimumGeneration in 0..7) }
fun satisfied(compute: Long, memory: Long, generation: Int) = compute >= minimumCompute && memory >= minimumMemory && generation >= minimumGeneration
}
Quelle
src/main/kotlin/dev/nebulastorage/api/production/ProductionRequirements.kt; editorial/de.json
43b4d12d69e6033c24fa8c39dac383ef2429b446