Package org.apache.turbine.util.db.map

Examples of org.apache.turbine.util.db.map.MapBuilder


     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here


     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }

            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.db.map.MapBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.