[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners Miner.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners
In directory dev1:/tmp/cvs-serv20530/src/org/eclipse/dstore/core/miners

Modified Files:
      Tag: R3_0_maintenance
	Miner.java 
Log Message:
[373507] [dstore][multithread] reduce heap memory on disconnect for server


Index: Miner.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/Miner.java,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -C2 -d -r1.13.2.1 -r1.13.2.2
*** Miner.java	3 Nov 2010 13:02:56 -0000	1.13.2.1
--- Miner.java	7 Mar 2012 18:20:30 -0000	1.13.2.2
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2002, 2010 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2002, 2012 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 20,23 ****
--- 20,24 ----
   * David McKnight    (IBM)  - [232004] [dstore][multithread] some miner finish() is not terminated sometimes
   * David McKnight    (IBM)  - [328060] [dstore] command queue in Miner should be synchronized
+  * David McKnight    (IBM)  - [373507] [dstore][multithread] reduce heap memory on disconnect for server
   *******************************************************************************/
  
***************
*** 129,147 ****
  	public void finish()
  	{
  		DataElement root = _dataStore.getMinerRoot();
- 
  		_minerData.removeNestedData();
  		_minerElement.removeNestedData();
  		_dataStore.update(_minerElement);
  
! 		if (root.getNestedData() != null)
! 		{
  			root.getNestedData().remove(_minerElement);
  		}
- 		root.setExpanded(false);
- 		root.setUpdated(false);
- 
- 		_dataStore.update(root);
- 
  		super.finish();
  	}
--- 130,147 ----
  	public void finish()
  	{
+ 		synchronized (_commandQueue){
+ 			_commandQueue.clear();
+ 		}
  		DataElement root = _dataStore.getMinerRoot();
  		_minerData.removeNestedData();
  		_minerElement.removeNestedData();
  		_dataStore.update(_minerElement);
  
! 		if (root != null && root.getNestedData() != null){
  			root.getNestedData().remove(_minerElement);
+ 			root.setExpanded(false);
+ 			root.setUpdated(false);
+ 			_dataStore.update(root);
  		}
  		super.finish();
  	}