avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup FortressServiceManager.java FortressServiceSelector.java
Date Thu, 03 Oct 2002 03:21:14 GMT
bloritsch    2002/10/02 20:21:14

  Modified:    fortress/src/java/org/apache/excalibur/fortress
                        AbstractContainer.java
               fortress/src/java/org/apache/excalibur/fortress/container
                        MetaDataContainer.java
               fortress/src/java/org/apache/excalibur/fortress/lookup
                        FortressServiceManager.java
                        FortressServiceSelector.java
  Log:
  make fortress free from excalibur collections
  
  Revision  Changes    Path
  1.62      +12 -10    jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java
  
  Index: AbstractContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- AbstractContainer.java	2 Oct 2002 01:52:20 -0000	1.61
  +++ AbstractContainer.java	3 Oct 2002 03:21:13 -0000	1.62
  @@ -53,8 +53,10 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  -import org.apache.avalon.excalibur.collections.BucketMap;
  -import org.apache.avalon.excalibur.collections.FixedSizeBuffer;
  +import java.util.Map;
  +
  +import org.apache.commons.collections.StaticBucketMap;
  +import org.apache.commons.collections.BoundedFifoBuffer;
   import org.apache.avalon.excalibur.logger.LoggerManager;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  @@ -106,8 +108,8 @@
       protected RoleManager m_roleManager;
       protected InstrumentManager m_instrumentManager;
       protected Configuration m_configuration;
  -    protected BucketMap m_configs = new BucketMap();
  -    protected BucketMap m_mapper = new BucketMap();
  +    protected Map m_configs = new StaticBucketMap();
  +    protected Map m_mapper = new StaticBucketMap();
       protected List m_components = new ArrayList( 10 );
       protected LifecycleExtensionManager m_extManager;
   
  @@ -210,11 +212,11 @@
   
           if( null != role && null != klass && null != handler )
           {
  -            BucketMap hintMap = (BucketMap)m_mapper.get( role );
  +            Map hintMap = (StaticBucketMap)m_mapper.get( role );
   
               if( null == hintMap )
               {
  -                hintMap = new BucketMap();
  +                hintMap = new StaticBucketMap();
               }
   
               hintMap.put( hint, handler );
  @@ -341,7 +343,7 @@
       public Object get( final String role, final Object hint )
           throws ServiceException
       {
  -        final BucketMap hintMap = (BucketMap)m_mapper.get( role );
  +        final Map hintMap = (StaticBucketMap)m_mapper.get( role );
           Object value;
   
           if( null == hintMap )
  @@ -384,7 +386,7 @@
        */
       public boolean has( final String role, final Object hint )
       {
  -        final BucketMap hintMap = (BucketMap)m_mapper.get( role );
  +        final Map hintMap = (StaticBucketMap)m_mapper.get( role );
           boolean hasComponent = false;
   
           if( null != hintMap )
  @@ -430,7 +432,7 @@
           throws Exception
       {
           Iterator i = m_components.iterator();
  -        FixedSizeBuffer buffer = new FixedSizeBuffer( m_components.size() );
  +        BoundedFifoBuffer buffer = new BoundedFifoBuffer( m_components.size() );
   
           while( i.hasNext() )
           {
  
  
  
  1.9       +1 -4      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/MetaDataContainer.java
  
  Index: MetaDataContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/MetaDataContainer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MetaDataContainer.java	2 Oct 2002 01:52:21 -0000	1.8
  +++ MetaDataContainer.java	3 Oct 2002 03:21:14 -0000	1.9
  @@ -51,8 +51,6 @@
   
   import java.util.HashMap;
   import java.util.Map;
  -import org.apache.avalon.excalibur.collections.BucketMap;
  -import org.apache.avalon.excalibur.collections.FixedSizeBuffer;
   import org.apache.avalon.excalibur.logger.LoggerManager;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  @@ -67,7 +65,6 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.excalibur.container.classloader.*;
  -import org.apache.excalibur.container.legacy.*;
   import org.apache.excalibur.event.Queue;
   import org.apache.excalibur.event.SinkException;
   import org.apache.excalibur.event.command.Command;
  
  
  
  1.17      +6 -4      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
  
  Index: FortressServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- FortressServiceManager.java	2 Oct 2002 01:52:21 -0000	1.16
  +++ FortressServiceManager.java	3 Oct 2002 03:21:14 -0000	1.17
  @@ -49,7 +49,7 @@
   */
   package org.apache.excalibur.fortress.lookup;
   
  -import org.apache.avalon.excalibur.collections.BucketMap;
  +import org.apache.commons.collections.StaticBucketMap;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.ComponentSelector;
   import org.apache.avalon.framework.context.Context;
  @@ -62,6 +62,8 @@
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
   
  +import java.util.Map;
  +
   /**
    * This is the Default ServiceManager for the Container.  It provides
    * a very simple abstraction, and makes it easy for the Container to manage
  @@ -73,7 +75,7 @@
   public class FortressServiceManager extends AbstractServiceManager
   {
       private final Container m_components;
  -    private final BucketMap m_used;
  +    private final Map m_used;
       private final ServiceManager m_parent;
       private final Context m_context;
       private final LifecycleExtensionManager m_extManager;
  @@ -120,7 +122,7 @@
           m_components = container;
           m_context = context;
           m_extManager = extManager;
  -        m_used = new BucketMap();
  +        m_used = new StaticBucketMap();
   
           if( m_components == null )
           {
  
  
  
  1.10      +6 -4      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java
  
  Index: FortressServiceSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FortressServiceSelector.java	2 Oct 2002 01:47:01 -0000	1.9
  +++ FortressServiceSelector.java	3 Oct 2002 03:21:14 -0000	1.10
  @@ -49,7 +49,7 @@
   */
   package org.apache.excalibur.fortress.lookup;
   
  -import org.apache.avalon.excalibur.collections.BucketMap;
  +import org.apache.commons.collections.StaticBucketMap;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceSelector;
  @@ -57,6 +57,8 @@
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
   
  +import java.util.Map;
  +
   /**
    * This is the Default ServiceSelector for the Container.  It provides
    * a very simple abstraction, and makes it easy for the Container to manage
  @@ -69,7 +71,7 @@
   {
       private final String m_role;
       private final Container m_components;
  -    private final BucketMap m_used;
  +    private final Map m_used;
       private final Context m_context;
       private final LifecycleExtensionManager m_extManager;
   
  @@ -82,7 +84,7 @@
           m_components = container;
           m_context = context;
           m_extManager = extManager;
  -        m_used = new BucketMap();
  +        m_used = new StaticBucketMap();
       }
   
       public Object select( final Object hint )
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message