[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/factory ...

Ben Wang bwang at jboss.com
Sat Jan 13 10:55:09 EST 2007


  User: bwang   
  Date: 07/01/13 10:55:09

  Added:       src/org/jboss/cache/pojo/factory  PCacheFactory.java
  Log:
  JBCACHE-922 Merged src-50 and tests-50 into src and tests, respectively.
  
  Revision  Changes    Path
  1.1      date: 2007/01/13 15:55:09;  author: bwang;  state: Exp;JBossCache/src/org/jboss/cache/pojo/factory/PCacheFactory.java
  
  Index: PCacheFactory.java
  ===================================================================
  /*
   * JBoss, Home of Professional Open Source
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package org.jboss.cache.pojo.factory;
  
  import org.jboss.cache.CacheFactory;
  import org.jboss.cache.DefaultCacheFactory;
  
  /**
   * Implementation of the Cache Factory
   *
   * @author <a href="mailto:ben.wang at jboss.com">Ben Wang</a>
   */
  public class PCacheFactory extends DefaultCacheFactory
  {
     private static CacheFactory singleton = null;
  
     /**
      * Protected constructor to prevent instantiation
      */
     protected PCacheFactory()
     {
        // protected constructor to prevent instantiation
     }
  
     public static CacheFactory getInstance()
     {
        if (singleton == null)
        {
           synchronized (PCacheFactory.class)
           {
              if (singleton == null)
              {
                 singleton = new PCacheFactory();
              }
           }
        }
        return singleton;
     }
  }
  
  
  



More information about the jboss-cvs-commits mailing list