知识卡片

普通读书笔记卡 · 5407.k

扩大胜任集合减少异常

理解等级:中级

组件胜任集合是它能正常处理的状态范围。遇到共享资源忙时,有的实现只抛异常,有的可等待或明确稍后自动完成,后者覆盖更多正常情境。异常预防也可用自动资源管理、包装器或纠错机制减少非法状态。扩大处理范围必须保留清楚时限与响应语义,不能用无限等待隐藏失效。

相关:[[异常检测须覆盖不同信号]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 可用性 · 查看原书依据

      Increasing a component’s competence set means designing it to handle more cases—faults—as part of its normal operation. For example, a component that assumes it has access to a shared resource might throw an exception if it discovers that access is blocked.

    参考来源

    - 位置:《Software Architecture in Practice, 4th Edition》第4章《可用性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch04.html) - 结论依据:原文的定义、机制或比较支持“组件胜任集合是它能正常处理的状态范围”;正文保留其条件与取舍。 - 原始内容:Increasing a component’s competence set means designing it to handle more cases—faults—as part of its normal operation. For example, a component that assumes it has access to a shared resource might throw an exception if it discovers that access is blocked.