notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2720 - in development/main/transit/core/handler/src/main/net/dpml/transit: cache management manager
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2720 - in development/main/transit/core/handler/src/main/net/dpml/transit: cache management manager
- Date: Sun, 05 Jun 2005 15:29:51 -0400
Author: mcconnell AT dpml.net
Date: Sun Jun 5 15:29:51 2005
New Revision: 2720
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
Log:
Updates dealing with dynamic removal of handlers.
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
Sun Jun 5 15:29:51 2005
@@ -166,7 +166,9 @@
}
catch( Exception e )
{
- e.printStackTrace();
+ final String error =
+ "Could not complete host update due to a internal error.";
+ m_model.getLogger().error( error, e );
}
}
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheManager.java
Sun Jun 5 15:29:51 2005
@@ -52,6 +52,6 @@
void addHostManager( HostManager manager ) throws DuplicateKeyException;
- void removeHostManager( HostManager manager ) throws
ModelReferenceException;
+ void removeHostManager( HostManager manager );
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryManager.java
Sun Jun 5 15:29:51 2005
@@ -41,7 +41,7 @@
void addContentManager( ContentManager manager ) throws
DuplicateKeyException;
- void removeContentManager( ContentManager manager ) throws
ModelReferenceException;
+ void removeContentManager( ContentManager manager );
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
Sun Jun 5 15:29:51 2005
@@ -256,23 +256,16 @@
}
}
- public void removeHostManager( HostManager manager ) throws
ModelReferenceException
+ public void removeHostManager( HostManager manager )
{
synchronized( m_lock )
{
Object[] listeners = manager.getListeners();
- if( listeners.length == 1 )
- {
- m_list.remove( manager );
- manager.removeModificationListener( this );
- HostRemovedEvent event = new HostRemovedEvent( this, manager
);
- super.enqueueEvent( event );
- setModified();
- }
- else
- {
- throw new ModelReferenceException( manager, listeners );
- }
+ m_list.remove( manager );
+ manager.removeModificationListener( this );
+ HostRemovedEvent event = new HostRemovedEvent( this, manager );
+ super.enqueueEvent( event );
+ setModified();
}
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
Sun Jun 5 15:29:51 2005
@@ -158,23 +158,15 @@
}
}
- public void removeContentManager( ContentManager manager ) throws
ModelReferenceException
+ public void removeContentManager( ContentManager manager )
{
synchronized( m_lock )
{
- Object[] listeners = manager.getListeners();
- if( listeners.length == 1 )
- {
- m_list.remove( manager );
- manager.removeModificationListener( this );
- ContentRemovedEvent event = new ContentRemovedEvent( this,
manager );
- super.enqueueEvent( event );
- setModified();
- }
- else
- {
- throw new ModelReferenceException( manager, listeners );
- }
+ m_list.remove( manager );
+ manager.removeModificationListener( this );
+ ContentRemovedEvent event = new ContentRemovedEvent( this,
manager );
+ super.enqueueEvent( event );
+ setModified();
}
}
- svn commit: r2720 - in development/main/transit/core/handler/src/main/net/dpml/transit: cache management manager, mcconnell, 06/05/2005
Archive powered by MHonArc 2.6.24.