In the case of eg.a singleton pattern using the constructor this can have severe consequences and lead to seemingly random null reference exceptions.

  • 单一模式使用构造函数可能会导致严重后果,会带来类似随机的空参数异常。
  • 来源:互联网摘选更新时间:2026-07-01 16:03:59

  • 重点词汇
  • severeadj.十分严重的;极为恶劣的;严厉的;苛刻的;艰难的;简朴的;
  • referencen. 参考;参考书;提及,涉及;证明人,介绍人;
  • the case[法]本案;
  • inprep. 在里面;在(某范围或空间内的)某一点;在(某物的形体或范围)中;在…内;在…中;进入
  • exceptionsn.例外( exception的名词复数 );不包括在内的人(或物);规则的例外;例外的事物;
  • ofprep. 关于;属于…的;由…制成;
  • andconj. 和;与;而且;于是;然后
  • randomadj.随机的;奇怪的;任意的;
  • 相关例句
1、

Using the Singleton pattern we guarantee that no matter how many times the BusinessLayerProxy tries to create a CommandFactory, only one instance will exist.

使用Singleton模式,我们可以保证无论BusinessLayerProxy多少次尝试建立CommandFactory,也只存在一个实例。

互联网摘选

2、

This setup means that no matter which thread uses this class in the Singleton Pattern, whenever that public method is called, it should output the same value.

这个测试类的意思就是不论那个线程在任何时候,在单例下调用这个类公共方法,都将返回相同的值。

互联网摘选

3、

To facilitate this, the plug-in class implements the singleton pattern: It stores a reference to itself in a private class variable.

为了使这一点更方便,插件类实现单模式(singleton pattern):它在私有类变量中存储一个自身的引用。

互联网摘选

4、

If we follow a straight singleton pattern for PoIdGenerator, this can be problematic.

如果我们使用PoIdGenerator的直接单一模式,可能会出现问题。

互联网摘选

5、

Most caches are implemented using the Singleton pattern involving a static reference to a top level Cache class as shown in this example.

使用Singleton模式实现的大多数缓存都涉及本例所示的对顶级Cache类的静态引用。

互联网摘选

6、

Create two methods for the Singleton Pattern: The constructor is private, and there is one public method called getInstance().

为Singleton模式创建两个方法:构造函数是私有的,且有一个公有的方法,称为getInstance()。

互联网摘选

7、

However, the project had two closely related scenarios where the singleton pattern proved useful: for logging and exception handling.

不过本项目中有两个紧密相关的场景可以证明独立模式是有用的:可以用于日志记录和异常处理。

互联网摘选

8、

Drag and drop the Singleton Pattern instance from the Pattern Explorer into the UML Class Diagram view.

将Singleton模式实例从模式浏览器中拖拽到UML类图视图中。

互联网摘选

9、

As its name suggests, the Singleton Pattern is typically used when you want only one instance of a particular class.

如其名称所暗示的,当您想要特别类的仅仅一个实例时,才使用Singleton模式。

互联网摘选

10、

The framework adopts object broker in singleton pattern to implement data access, effectively enhances the efficiency of connection;

框架采用了单实例的对象代理来实现数掘访问,有效地提高了连接操作的效率;

互联网摘选

11、

Create a private attribute for the Singleton Pattern called_instance.

为Singleton模式创建私有属性,称为instance。

互联网摘选

12、

The singleton pattern can be used to delay the initialization of an object as long as possible.

单元素模式可以用来尽可能久地延迟对象的初始化。

互联网摘选

13、

This is a standard PHP singleton pattern.

这是一个标准的PHP单元素模式。

互联网摘选

14、

Singleton pattern makes construction method of the class protected, and ensures only one instance to be created.

Singleton模式把类的构造方法隐藏在静态方法后面,保证系统中仅有1个类的实例被创建。

互联网摘选

15、

Doing so creates an instance of the Singleton Pattern in the Model Explorer.

执行此操作将会在模型浏览器中生成一个Singleton模式的实例。

互联网摘选

16、

As the name implies, this strategy is used primarily in applications that support a high degree of concurrency from a user perspective.

顾名思义,此策略主要在从用户的角度支持高度并发性的应用程序中使用。

互联网摘选

17、

The residue number system ( RNS) is a carry-free system and allows a high degree of concurrency.

余数系统(RNS)是一种并行工作机制并伴随自由进位的系统。

互联网摘选

18、

Modules with small particle size of shared memory communication, high speed, concurrency is good.

模块间采用小粒度的共享内存通讯方式,速度快,并发性好。

互联网摘选

19、

To support high-throughput and high-user-concurrency requirements in an application or subsystem, you need high database concurrency.

为了在应用程序或子系统中支持高吞吐量和高用户并发性,您需要高数据库并发性。

互联网摘选

20、

To support high database concurrency, you need to reduce database locks and hold resources for as little time as possible.

要支持高数据库并发性,则需要减少数据库锁,并尽可能缩短保持资源的时间。

互联网摘选

  • 今日热词
  • 热门搜索

英语网英语词典(dict.25820.com)为您提供在线翻译英语词典单词大全英译汉汉译英等英语服务!可按单词字数词义分类查询。支持lj:关键词格式查询例句。

用户反馈
请选择反馈类型(可多选):
您的联系方式:
反馈内容:
提交成功 小编会尽快处理
回到顶部
点击反馈