Ensure clear all containers - not just active ones

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@478262 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-11-22 18:06:24 +00:00
parent e78a6f7ee9
commit 5e1da9a9a6
1 changed files with 7 additions and 4 deletions

View File

@ -118,14 +118,17 @@ public class KahaStore implements Store{
public synchronized void clear() throws IOException{
initialize();
for(Iterator i=maps.values().iterator();i.hasNext();){
BaseContainerImpl container=(BaseContainerImpl)i.next();
for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
ContainerId id = (ContainerId)i.next();
MapContainer container = getMapContainer(id.getKey(),id.getDataContainerName());
container.clear();
}
for(Iterator i=lists.values().iterator();i.hasNext();){
BaseContainerImpl container=(BaseContainerImpl)i.next();
for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
ContainerId id = (ContainerId)i.next();
ListContainer container = getListContainer(id.getKey(),id.getDataContainerName());
container.clear();
}
}
public synchronized boolean delete() throws IOException{