singleton pattern 中文意思是什麼

singleton pattern 解釋
單例模式
  • singleton : n. 【牌戲】(某一花色的)單張;孤張;手拿孤張的人;〈美俚〉只有一個影片的演出;獨一無二的(人或物)。
  • pattern : n 1 模範,榜樣;典範。2 型,模型;模式;雛型;【冶金】原型。3 花樣;式樣;(服裝裁剪的)紙樣;圖...
  1. The singleton pattern is shown in figure 5

    Singleton模式如圖5所示。
  2. Class an implementation of the singleton pattern, as only one instance of the

    類成為單體模式的實現,因為在應用程序中只存在
  3. We do this by applying the singleton pattern and creating a new class, commandfactory, as the singleton

    既然我們已經訪問了業務層,就需要建立commandfactory類。我們通過應用singleton模式,創造一個新類commandfactory 。
  4. To facilitate this, the plug - in class implements the singleton pattern : it stores a reference to itself in a private class variable

    為了使這一點更方便,插件類實現單模式( singleton pattern ) :它在私有類變量中存儲一個自身的引用。
  5. Classes definitions can now include static members ( properties ), accessible via the class. common usage of static members is in the singleton pattern

    類定義現在包含了靜態成員(屬性)的定義,並通過類訪問它們。通常靜態成員用於單獨的部分。
  6. Typical examples include a cached dao, cache of jndi references, or any sort of common factory or other component that needs to use the singleton pattern

    典型的例子有:緩存的dao , jndi引用的緩存,或者任何類型的公共工廠或者其他需要使用singleton模式的組件。
  7. 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 ,也只存在一個實例。
  8. Unless the settings wrapper class is designed using the singleton pattern, there can be multiple instances of the same application settings class in a single application

    除非使用單一實例模式來設計設置包裝類,否則單個應用程序中可能存在同一個應用程序設置類的多個實例。
  9. Since there can be only one un - caught handler per process active at a time, the constructor should be invoked only once ; hence, the reason for the singleton pattern

    因為每次只能有一個未捕獲的處理程序處理一個活動進程,構造函數應該只被調用一次,因此要採用singleton模式。
  10. The framework we ll create is a simple 3 - tier framework that processes business logic using three patterns : the 3 - layer architecture pattern, the singleton pattern, and the command pattern

    我們將要建立的是一個簡單的3 - tier框架,它使用了三種模式處理業務邏輯: 3 - layer體系結構模式、 singleton模式和command模式。
分享友人