2020年7月21日

摘要: 享元模式 享元模式(Flyweight Pattern)主要用于减少创建对象的数量,以减少内存占用和提高性能。这种类型的设计模式属于结构型模式,它提供了减少对象数量从而改善应用所需的对象结构的方式。 介绍 意图:运用共享技术有效地支持大量细粒度的对象。 面向对象技术可以很好地解决一些灵活性或可扩展性 阅读全文
posted @ 2020-07-21 19:33 shumeigang 阅读(166) 评论(0) 推荐(0)
摘要: 备忘录模式(Memento Pattern) 定义:Without violating encapsulation,capture and externalize an object's internal state so that the object can be restored to thi 阅读全文
posted @ 2020-07-21 19:32 shumeigang 阅读(161) 评论(0) 推荐(0)
摘要: CentOS 7.0默认使用的是firewall作为防火墙 查看防火墙状态 firewall-cmd --state not running (没有起动) 方法:手动启动它 systemctl start firewalld //启动服务 又出错: Failed to start firewalld 阅读全文
posted @ 2020-07-21 17:19 shumeigang 阅读(222) 评论(0) 推荐(1)
摘要: 工厂模式 概述: 工厂模式具体包括了简单工厂、工厂方法、抽象工厂,它们是按照从简单到复杂的顺序排列的,属于设计模式中的创建型,其中简单工厂并不属于GOF的23中模式。但是它是理解其它的工厂模式的一个很好的基础,所以很多人在讲述设计模式的时候会提到简单工厂模式。创建型模式关注的是对象的创建,创建型模式 阅读全文
posted @ 2020-07-21 17:17 shumeigang 阅读(138) 评论(0) 推荐(0)
摘要: 抽象工厂模式(Abstract Factory Pattern) 定义:Provide an interface for creating families of related or dependent objects without specifying their concrete class 阅读全文
posted @ 2020-07-21 17:16 shumeigang 阅读(154) 评论(0) 推荐(0)

导航