public ShareableResource setCapacity ( Node n , int val ) { if ( val < 0 ) { throw new IllegalArgumentException ( String . format ( "The '%s' capacity of node '%s' must be >= 0" , rcId , n ) ) ; } nodesCapacity . put ( n , val ) ; return this ; }
Set the resource consumption of a node .