Lines 14-19
Link Here
|
14 |
* David Dykstal (IBM) - 142806: refactoring persistence framework |
14 |
* David Dykstal (IBM) - 142806: refactoring persistence framework |
15 |
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType |
15 |
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType |
16 |
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods |
16 |
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods |
|
|
17 |
* Kevin Doyle (IBM) - [200735] Delete a profile and it returns after restart with no connections |
17 |
********************************************************************************/ |
18 |
********************************************************************************/ |
18 |
|
19 |
|
19 |
package org.eclipse.rse.internal.core.model; |
20 |
package org.eclipse.rse.internal.core.model; |
Lines 50-55
Link Here
|
50 |
private boolean isActive = true; |
51 |
private boolean isActive = true; |
51 |
private String name = null; |
52 |
private String name = null; |
52 |
private boolean defaultPrivate = false; |
53 |
private boolean defaultPrivate = false; |
|
|
54 |
private boolean quiesceState = false; |
53 |
|
55 |
|
54 |
/** |
56 |
/** |
55 |
* Default constructor |
57 |
* Default constructor |
Lines 212-219
Link Here
|
212 |
public boolean commit() |
214 |
public boolean commit() |
213 |
{ |
215 |
{ |
214 |
boolean result = false; |
216 |
boolean result = false; |
215 |
if (!RSECorePlugin.getThePersistenceManager().isBusy()) { |
217 |
if (!quiesceState) { |
216 |
result = RSECorePlugin.getThePersistenceManager().commitProfile(this, 5000); |
218 |
// Need to check if busy otherwise Initialize RSE job will take forever |
|
|
219 |
// because all the commit's are waiting to acquire a lock. |
220 |
if (!RSECorePlugin.getThePersistenceManager().isBusy()) { |
221 |
result = RSECorePlugin.getThePersistenceManager().commitProfile(this, 5000); |
222 |
} |
223 |
} else { |
224 |
setDirty(true); |
217 |
} |
225 |
} |
218 |
return result; |
226 |
return result; |
219 |
} |
227 |
} |
Lines 250-253
Link Here
|
250 |
this.provider = provider; |
258 |
this.provider = provider; |
251 |
} |
259 |
} |
252 |
|
260 |
|
|
|
261 |
/** |
262 |
* Sets the quiesce state of the profile. If this is set to true |
263 |
* then commits will be ignored. If this is set to false then |
264 |
* it will check if the profile is dirty and commit the profile |
265 |
* if needed and future commits won't be ignored. |
266 |
* @param state The quiesce state of the profile. |
267 |
*/ |
268 |
public void setQuiesceState(final boolean state) { |
269 |
quiesceState = state; |
270 |
// If we are changing the quiesce state to false |
271 |
// and the profile is dirty then we need to do a commit |
272 |
if (!quiesceState && isDirty()) { |
273 |
commit(); |
274 |
} |
275 |
} |
276 |
|
277 |
/** |
278 |
* Returns the quiesce state of the profile. |
279 |
* @return <code>true</code> if the profile is in the quiesce state |
280 |
* else <code>false</code>. |
281 |
*/ |
282 |
public boolean getQuiesceState() { |
283 |
return quiesceState; |
284 |
} |
253 |
} |
285 |
} |