[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/model DataStore.java DataElement.java

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

Modified Files:
	DataStore.java DataElement.java 
Log Message:
[373507] [dstore][multithread] reduce heap memory on disconnect for server


Index: DataStore.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** DataStore.java	2 Feb 2012 15:12:40 -0000	1.60
--- DataStore.java	7 Mar 2012 14:14:16 -0000	1.61
***************
*** 42,45 ****
--- 42,46 ----
   * David McKnight   (IBM) - [367096] [dstore] DataElement.isSpirit() may return true for newly created DStore objects
   * David McKnight   (IBM) - [370260] [dstore] log the RSE version in server traces
+  * David McKnight   (IBM) - [373507] [dstore][multithread] reduce heap memory on disconnect for server
   *******************************************************************************/
  
***************
*** 2644,2650 ****
--- 2645,2677 ----
  		flush(_dummy);
  		flush(_root);
+ 		flush(_externalRoot);
+ 		
+ 		// make sure these aren't null set since
+ 		// Miners need them on shutdown
+ 		// _logRoot = null;
+ 		// _minerRoot = null;
+ 		
+ 		_hostRoot = null;
+ 		_tempRoot = null;
+ 		_descriptorRoot = null;
+ 		_dummy = null;
+ 		_root = null;
+ 		_externalRoot = null;
+ 		_status = null;
+ 		_ticket = null;
  
+ 		// clear the maps
+ 		_classReqRepository.clear();
+ 		_cmdDescriptorMap.clear();
+ 		_hashMap.clear();
+ 		_lastCreatedElements.clear();
+ 		_localClassLoaders.clear();
+ 		_objDescriptorMap.clear();
+ 		_relDescriptorMap.clear();
+ 		
+ 		_remoteLoader = null;
  	}
  
+ 
  	/**
  	 * Delete information from the <code>DataStore</code> contained by an element.
***************
*** 4205,4208 ****
--- 4232,4243 ----
  		//if (isVirtual())
  		//	flush();
+ 		
+ 		if (!isVirtual()){ // only on server
+ 			if (getClient() != null){
+ 				getClient().getLogger().logInfo(this.getName(), "DataStore.finish() - flush()"); //$NON-NLS-1$
+ 			}
+ 			flush();
+ 		}
+ 		
  		if (_deRemover != null){
  			_deRemover.finish();

Index: DataElement.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** DataElement.java	25 Sep 2008 18:28:47 -0000	1.18
--- DataElement.java	7 Mar 2012 14:14:16 -0000	1.19
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2002, 2008 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
***************
*** 14,17 ****
--- 14,18 ----
   * Contributors:
   * David McKnight   (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
+  * David McKnight    (IBM)  - [373507] [dstore][multithread] reduce heap memory on disconnect for server
   *******************************************************************************/
  
***************
*** 86,93 ****
--- 87,99 ----
  	}
  	
+ 	/* Apparently having this method causes the GC to delay
+ 	 * cleanup for DataElements.  For a product this delayed cleanup
+ 	 * can potentially result in an OOM so, at the expense of the
+ 	 * memory logging function, we need to take this out.
  	protected void finalize()
  	{
  		DataElementRemover.addToGCedCount();
  	}
+ 	*/
  
  	/**