Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 385794 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/dstore/core/model/DataElement.java (-5 / +2 lines)
Lines 15-20 Link Here
15
 * David McKnight   (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
15
 * David McKnight   (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
16
 * David McKnight    (IBM)  - [373507] [dstore][multithread] reduce heap memory on disconnect for server
16
 * David McKnight    (IBM)  - [373507] [dstore][multithread] reduce heap memory on disconnect for server
17
 * David McKnight   (IBM) - [380158] [dstore] DataStore.command() fails when multiple commands issue simultaneously
17
 * David McKnight   (IBM) - [380158] [dstore] DataStore.command() fails when multiple commands issue simultaneously
18
 * David McKnight   (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed
18
 *******************************************************************************/
19
 *******************************************************************************/
19
20
20
package org.eclipse.dstore.core.model;
21
package org.eclipse.dstore.core.model;
Lines 1627-1637 Link Here
1627
		{
1628
		{
1628
			for (int i = 0; i < _attributes.length; i++)
1629
			for (int i = 0; i < _attributes.length; i++)
1629
			{
1630
			{
1630
				String att = _attributes[i];
1631
				_attributes[i] = null;
1631
				if (att != null)
1632
				{
1633
					att = null;
1634
				}
1635
			}
1632
			}
1636
1633
1637
		}
1634
		}
(-)src/org/eclipse/dstore/core/model/DataStore.java (-2 / +2 lines)
Lines 41-46 Link Here
41
 * David McKnight   (IBM) - [370260] [dstore] log the RSE version in server traces
41
 * David McKnight   (IBM) - [370260] [dstore] log the RSE version in server traces
42
 * David McKnight   (IBM) - [373507] [dstore][multithread] reduce heap memory on disconnect for server
42
 * David McKnight   (IBM) - [373507] [dstore][multithread] reduce heap memory on disconnect for server
43
 * David McKnight   (IBM) - [385097] [dstore] DataStore spirit mechanism is not enabled
43
 * David McKnight   (IBM) - [385097] [dstore] DataStore spirit mechanism is not enabled
44
 * David McKnight   (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed
44
 *******************************************************************************/
45
 *******************************************************************************/
45
46
46
package org.eclipse.dstore.core.model;
47
package org.eclipse.dstore.core.model;
Lines 2871-2877 Link Here
2871
					return results;
2872
					return results;
2872
				}
2873
				}
2873
2874
2874
				if (root.isDeleted())
2875
				if (root.isDeleted() && !results.contains(root))
2875
				{
2876
				{
2876
					results.add(root);
2877
					results.add(root);
2877
				}
2878
				}
Lines 2890-2896 Link Here
2890
							{
2891
							{
2891
								if (child.isDeleted() && !results.contains(child))
2892
								if (child.isDeleted() && !results.contains(child))
2892
								{
2893
								{
2893
2894
									results.add(child);
2894
									results.add(child);
2895
									if (!child.isReference())
2895
									if (!child.isReference())
2896
									{
2896
									{
(-)src/org/eclipse/dstore/core/model/UpdateHandler.java (-5 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2008 IBM Corporation and others.
2
 * Copyright (c) 2002, 212 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 14-19 Link Here
14
 * Contributors:
14
 * Contributors:
15
 * David McKnight   (IBM)   [202822] should not be synchronizing on clean method
15
 * David McKnight   (IBM)   [202822] should not be synchronizing on clean method
16
 * David McKnight   (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
16
 * David McKnight   (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
17
 * David McKnight   (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed
17
 *******************************************************************************/
18
 *******************************************************************************/
18
19
19
package org.eclipse.dstore.core.model;
20
package org.eclipse.dstore.core.model;
Lines 88-100 Link Here
88
89
89
					cleanChildren(child); // clean the children
90
					cleanChildren(child); // clean the children
90
91
92
					boolean virtual = _dataStore.isVirtual();
91
					if (child.isSpirit())
93
					if (child.isSpirit())
92
					{
94
					{
93
						// officially delete this now
95
						if (!virtual){ // leave the client copy
94
						child.delete();
96
							// officially delete this now
97
							child.delete();
98
						}
99
					}
100
					if (!virtual || !child.isSpirit()){ // leave the client attributes if spirited
101
						child.clear();
95
					}
102
					}
96
					child.clear();
97
98
					if (parent != null)
103
					if (parent != null)
99
					{
104
					{
100
						synchronized (parent)
105
						synchronized (parent)
(-)src/org/eclipse/dstore/core/server/ServerReceiver.java (-6 / +28 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2009 IBM Corporation and others.
2
 * Copyright (c) 2002, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 18-29 Link Here
18
 * Noriaki Takatsu  (IBM) - [257666] [multithread] TCP/IP socket connection is not closed
18
 * Noriaki Takatsu  (IBM) - [257666] [multithread] TCP/IP socket connection is not closed
19
 * David McKnight   (IBM) - [257666] modified original patch to simplify
19
 * David McKnight   (IBM) - [257666] modified original patch to simplify
20
 * Noriaki Takatsu  (IBM) - [283656] [dstore][multithread] Serviceability issue
20
 * Noriaki Takatsu  (IBM) - [283656] [dstore][multithread] Serviceability issue
21
 * David McKnight   (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed
21
 *******************************************************************************/
22
 *******************************************************************************/
22
23
23
package org.eclipse.dstore.core.server;
24
package org.eclipse.dstore.core.server;
24
25
25
import java.io.IOException;
26
import java.io.IOException;
26
import java.net.Socket;
27
import java.net.Socket;
28
import java.util.List;
27
29
28
import org.eclipse.dstore.core.model.DataElement;
30
import org.eclipse.dstore.core.model.DataElement;
29
import org.eclipse.dstore.core.util.Receiver;
31
import org.eclipse.dstore.core.util.Receiver;
Lines 37-45 Link Here
37
 */
39
 */
38
public class ServerReceiver extends Receiver
40
public class ServerReceiver extends Receiver
39
{
41
{
40
42
	private DataElement _log;
43
	private int _maxLog = 20;
44
	private int _logIndex = 0;
45
	
41
	private ConnectionEstablisher _connection;
46
	private ConnectionEstablisher _connection;
42
47
	
43
	/**
48
	/**
44
	 * Constructor
49
	 * Constructor
45
	 *
50
	 *
Lines 66-74 Link Here
66
		{
71
		{
67
			DataElement rootOutput = documentObject.get(a);
72
			DataElement rootOutput = documentObject.get(a);
68
73
69
			DataElement log = _dataStore.getLogRoot();
74
			// max log 
70
			log.addNestedData(rootOutput, false);
75
			List logged = _log.getNestedData();
71
76
			if (logged == null){
77
				_log.addNestedData(rootOutput, false);
78
				_logIndex++;
79
			}
80
			else {
81
				if (_logIndex > _maxLog){
82
					_logIndex = 0; // reset logindex
83
				}
84
			
85
				if (logged.size() > _logIndex){
86
					logged.set(_logIndex, rootOutput);
87
				}
88
				else {
89
					logged.add(_logIndex, rootOutput);
90
				}
91
				_logIndex++;
92
			}
93
			
72
			if (rootOutput.getName().equals("C_EXIT")) //$NON-NLS-1$
94
			if (rootOutput.getName().equals("C_EXIT")) //$NON-NLS-1$
73
			{
95
			{
74
				finish();
96
				finish();

Return to bug 385794