Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2006, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2006, 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 14-19
Link Here
|
14 |
* Contributors: |
14 |
* Contributors: |
15 |
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread |
15 |
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread |
16 |
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients |
16 |
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients |
|
|
17 |
* David McKnight (IBM) - [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM |
17 |
*******************************************************************************/ |
18 |
*******************************************************************************/ |
18 |
|
19 |
|
19 |
package org.eclipse.rse.internal.dstore.universal.miners.filesystem; |
20 |
package org.eclipse.rse.internal.dstore.universal.miners.filesystem; |
Lines 24-29
Link Here
|
24 |
import java.io.FileNotFoundException; |
25 |
import java.io.FileNotFoundException; |
25 |
import java.io.IOException; |
26 |
import java.io.IOException; |
26 |
import java.io.UnsupportedEncodingException; |
27 |
import java.io.UnsupportedEncodingException; |
|
|
28 |
import java.lang.reflect.Method; |
27 |
|
29 |
|
28 |
import org.eclipse.dstore.core.model.DE; |
30 |
import org.eclipse.dstore.core.model.DE; |
29 |
import org.eclipse.dstore.core.model.DataElement; |
31 |
import org.eclipse.dstore.core.model.DataElement; |
Lines 62-69
Link Here
|
62 |
{ |
64 |
{ |
63 |
super.run(); |
65 |
super.run(); |
64 |
|
66 |
|
65 |
handleDownload(_cmdElement, _status); |
67 |
handleDownload(_cmdElement, _status); |
66 |
_isDone = true; |
68 |
_isDone = true; |
|
|
69 |
removeFromCancellableList(); |
70 |
} |
71 |
|
72 |
private void removeFromCancellableList(){ |
73 |
Class clazz = _miner.getClass(); |
74 |
|
75 |
try { |
76 |
Method[] methods = clazz.getDeclaredMethods(); |
77 |
for (int i = 0; i < methods.length; i++){ |
78 |
Method method = methods[i]; |
79 |
if (method.getName().equals("updateCancellableThreads")){ //$NON-NLS-1$ |
80 |
method.setAccessible(true); |
81 |
Object[] args = { _status.getParent(), this }; |
82 |
method.invoke(_miner, args); |
83 |
return; |
84 |
} |
85 |
} |
86 |
|
87 |
} catch (Exception e) { |
88 |
_dataStore.trace(e); |
89 |
} |
67 |
} |
90 |
} |
68 |
|
91 |
|
69 |
public boolean isDone() |
92 |
public boolean isDone() |