1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-18 22:45:23 +02:00

[368980] [dstore] default wait threshold for DStoreStatusMonitor is too large

This commit is contained in:
David McKnight 2012-01-18 15:49:49 +00:00
parent 8fe1012c8c
commit 68ef5d2627

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2009 IBM Corporation and others. * Copyright (c) 2006, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,6 +20,7 @@
* David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge * David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
* David McKnight (IBM) - [261644] [dstore] remote search improvements * David McKnight (IBM) - [261644] [dstore] remote search improvements
* David McKnight (IBM) - [283157] [dstore] Remote search didn't end when the dstore server crashed * David McKnight (IBM) - [283157] [dstore] Remote search didn't end when the dstore server crashed
* David McKnight (IBM) - [368980] [dstore] default wait threshold for DStoreStatusMonitor is too large
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.services.dstore.util; package org.eclipse.rse.services.dstore.util;
@ -155,9 +156,12 @@ public class DStoreStatusMonitor implements IDomainListener
*/ */
public boolean determineStatusDone(DataElement status) public boolean determineStatusDone(DataElement status)
{ {
return status.getAttribute(DE.A_VALUE).equals("done") || //$NON-NLS-1$ boolean statusDone =
status.getAttribute(DE.A_NAME).equals("done") ||//$NON-NLS-1$ status.getAttribute(DE.A_VALUE).equals("done") || //$NON-NLS-1$
status.getAttribute(DE.A_NAME).equals("cancelled"); //$NON-NLS-1$ status.getAttribute(DE.A_NAME).equals("done") ||//$NON-NLS-1$
status.getAttribute(DE.A_NAME).equals("cancelled"); //$NON-NLS-1$
return statusDone;
} }
/** /**
@ -226,14 +230,14 @@ public class DStoreStatusMonitor implements IDomainListener
return _networkDown; return _networkDown;
} }
public DataElement waitForUpdate(DataElement status) throws InterruptedException public DataElement waitForUpdate(DataElement status) throws InterruptedException
{ {
return waitForUpdate(status, null, 1000); return waitForUpdate(status, null, 100);
} }
public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException
{ {
return waitForUpdate(status, monitor, 1000); return waitForUpdate(status, monitor, 100);
} }
public DataElement waitForUpdate(DataElement status, int wait) throws InterruptedException public DataElement waitForUpdate(DataElement status, int wait) throws InterruptedException
@ -286,7 +290,6 @@ public class DStoreStatusMonitor implements IDomainListener
} }
waitForUpdate(); waitForUpdate();
//Thread.sleep(200);
if (!status.getDataStore().isConnected()){ if (!status.getDataStore().isConnected()){
// not connected anymore! // not connected anymore!
_networkDown = true; _networkDown = true;