عرض عملي: تنفيذ استيراد أسعار الخلاصة بالتوازي
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
speed up the supplier price import; prepares MID-003-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Show the sequential import of five suppliers (each about 300 ms): about 1.5 s.
- Wrap each import in a
Callable; submit to a fixed pool of 5. - Collect with
Future.get(timeout); gather successes and failures into a report. - Measure again: wall clock near the slowest supplier.
- Planned mistake: forget
shutdown()and watch the app not exit. Fix:shutdownplusawaitTerminationinfinally(or try-with-resources on newer JDKs; verify version before recording). - Print the report: imported, failed, timed out.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.