mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-24 00:33:48 +02:00
[231126] [dstore] status monitor needs to reset WaitThreshold on nudge
This commit is contained in:
parent
38da2bc7c5
commit
6111d56772
3 changed files with 14 additions and 4 deletions
|
@ -14,7 +14,8 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||||
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
||||||
* David McKnight (IBM) - [229947] [dstore] [dstore] interruption to Thread.sleep() should not stop waitForUpdate()
|
* David McKnight (IBM) - [229947] [dstore] interruption to Thread.sleep() should not stop waitForUpdate()
|
||||||
|
* David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.connectorservice.dstore.util;
|
package org.eclipse.rse.connectorservice.dstore.util;
|
||||||
|
@ -286,7 +287,8 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
||||||
Display display = Display.getCurrent();
|
Display display = Display.getCurrent();
|
||||||
|
|
||||||
// Prevent infinite looping by introducing a threshold for wait
|
// Prevent infinite looping by introducing a threshold for wait
|
||||||
int WaitThreshold = 50; //default. sleep(100ms) for 600 times
|
final int initialWaitThreshold = 50;
|
||||||
|
int WaitThreshold = initialWaitThreshold;
|
||||||
if ( wait > 0 )
|
if ( wait > 0 )
|
||||||
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
|
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
|
||||||
else if ( wait == -1 ) // force a diagnostic
|
else if ( wait == -1 ) // force a diagnostic
|
||||||
|
@ -341,6 +343,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
||||||
return status; // returning the undone status object
|
return status; // returning the undone status object
|
||||||
|
|
||||||
nudges++;
|
nudges++;
|
||||||
|
WaitThreshold = initialWaitThreshold;
|
||||||
}
|
}
|
||||||
else if (_networkDown)
|
else if (_networkDown)
|
||||||
{
|
{
|
||||||
|
@ -395,6 +398,7 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
||||||
return status; // returning the undone status object
|
return status; // returning the undone status object
|
||||||
|
|
||||||
nudges++;
|
nudges++;
|
||||||
|
WaitThreshold = initialWaitThreshold;
|
||||||
}
|
}
|
||||||
else if (_networkDown)
|
else if (_networkDown)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* David McKnight (IBM) - [197480] eliminating UI dependencies
|
* David McKnight (IBM) - [197480] eliminating UI dependencies
|
||||||
* David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
|
* David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
|
||||||
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
||||||
|
* David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.dstore.util;
|
package org.eclipse.rse.services.dstore.util;
|
||||||
|
@ -254,7 +255,8 @@ public class DStoreStatusMonitor implements IDomainListener
|
||||||
|
|
||||||
|
|
||||||
// Prevent infinite looping by introducing a threshold for wait
|
// Prevent infinite looping by introducing a threshold for wait
|
||||||
int WaitThreshold = 50; //default. sleep(100ms) for 60 times
|
final int initialWaitThreshold = 50;
|
||||||
|
int WaitThreshold = initialWaitThreshold;
|
||||||
if ( wait > 0 )
|
if ( wait > 0 )
|
||||||
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
|
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
|
||||||
else if ( wait == -1 ) // force a diagnostic
|
else if ( wait == -1 ) // force a diagnostic
|
||||||
|
@ -296,6 +298,7 @@ public class DStoreStatusMonitor implements IDomainListener
|
||||||
return status; // returning the undone status object
|
return status; // returning the undone status object
|
||||||
|
|
||||||
nudges++;
|
nudges++;
|
||||||
|
WaitThreshold = initialWaitThreshold;
|
||||||
}
|
}
|
||||||
else if (_networkDown)
|
else if (_networkDown)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [219952] Use MessageFormat for download progress message
|
* Martin Oberhuber (Wind River) - [219952] Use MessageFormat for download progress message
|
||||||
* David McKnight (IBM) - [222448] [dstore] update DownloadListener to handle timeouts and nudge
|
* David McKnight (IBM) - [222448] [dstore] update DownloadListener to handle timeouts and nudge
|
||||||
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
* David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
|
||||||
|
* David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.dstore.util;
|
package org.eclipse.rse.services.dstore.util;
|
||||||
|
@ -234,7 +235,8 @@ public class DownloadListener implements IDomainListener
|
||||||
public DataElement waitForUpdate(int wait) throws InterruptedException
|
public DataElement waitForUpdate(int wait) throws InterruptedException
|
||||||
{
|
{
|
||||||
// Prevent infinite looping by introducing a threshold for wait
|
// Prevent infinite looping by introducing a threshold for wait
|
||||||
int WaitThreshold = 50; //default. sleep(100ms) for 150 times
|
final int initialWaitTheshold = 50;
|
||||||
|
int WaitThreshold = initialWaitTheshold;
|
||||||
|
|
||||||
if (wait > 0)
|
if (wait > 0)
|
||||||
WaitThreshold = wait * 10; // 1 second means 10 sleep(100ms)
|
WaitThreshold = wait * 10; // 1 second means 10 sleep(100ms)
|
||||||
|
@ -275,6 +277,7 @@ public class DownloadListener implements IDomainListener
|
||||||
{
|
{
|
||||||
// try to wake up the server
|
// try to wake up the server
|
||||||
wakeupServer(_status);
|
wakeupServer(_status);
|
||||||
|
WaitThreshold = initialWaitTheshold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue