mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-12 19:45:22 +02:00
[289234][multithread][api] Reset and Restart KeepAliveRequestThread
This commit is contained in:
parent
92a611b86c
commit
20b5a96ef0
4 changed files with 44 additions and 3 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.dstore.core
|
Bundle-SymbolicName: org.eclipse.dstore.core
|
||||||
Bundle-Version: 3.2.100.qualifier
|
Bundle-Version: 3.3.100.qualifier
|
||||||
Bundle-Activator: org.eclipse.dstore.core.Activator
|
Bundle-Activator: org.eclipse.dstore.core.Activator
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2009 IBM Corporation and others.
|
* Copyright (c) 2002, 2010 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
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
* Noriaki Takatsu (IBM) - [257666] [multithread] TCP/IP socket connection is not closed
|
* Noriaki Takatsu (IBM) - [257666] [multithread] TCP/IP socket connection is not closed
|
||||||
* David McKnight (IBM) - [257666] modified original patch to simplify
|
* David McKnight (IBM) - [257666] modified original patch to simplify
|
||||||
* Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
|
* Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
|
||||||
|
* Noriaki Takatsu (IBM) - [289234][multithread][api] Reset and Restart KeepAliveRequestThread
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.server;
|
package org.eclipse.dstore.core.server;
|
||||||
|
@ -118,5 +119,17 @@ public class ServerReceiver extends Receiver
|
||||||
System.out.println(IOe);
|
System.out.println(IOe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interrupt the current KeepAliveRequest thread and restart
|
||||||
|
* the KeepAliveRequest thread with the specified timeout
|
||||||
|
*
|
||||||
|
* @param timeout when the KeepAliveRequest thread is expired
|
||||||
|
* @since 3.3
|
||||||
|
*/
|
||||||
|
public void resetKeepAliveRequest(long timeout)
|
||||||
|
{
|
||||||
|
xmlParser().resetKeepAliveRequest(timeout, socket());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2009 IBM Corporation and others.
|
* Copyright (c) 2002, 2010 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
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||||
|
* Noriaki Takatsu (IBM) - [289234][multithread][api] Reset and Restart KeepAliveRequestThread
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.util;
|
package org.eclipse.dstore.core.util;
|
||||||
|
@ -184,6 +185,16 @@ public abstract class Receiver extends SecuredThread implements IDataStorePrefer
|
||||||
{
|
{
|
||||||
return _socket;
|
return _socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the associated xml parser
|
||||||
|
* @return the xml parser
|
||||||
|
* @since 3.3
|
||||||
|
*/
|
||||||
|
public XMLparser xmlParser()
|
||||||
|
{
|
||||||
|
return _xmlParser;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implemented to provide a means of handling received input
|
* Implemented to provide a means of handling received input
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* David McKnight (IBM) [305218][dstore] problem reading double-byte characters through data socket layer
|
* David McKnight (IBM) [305218][dstore] problem reading double-byte characters through data socket layer
|
||||||
* David McKnight (IBM) [307541][dstore] fix for Bug 305218 breaks RDz connections
|
* David McKnight (IBM) [307541][dstore] fix for Bug 305218 breaks RDz connections
|
||||||
* David McKnight (IBM) [322407][dstore] Connection dropped automatically when idle
|
* David McKnight (IBM) [322407][dstore] Connection dropped automatically when idle
|
||||||
|
* Noriaki Takatsu (IBM) - [289234][multithread][api] Reset and Restart KeepAliveRequestThread
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.internal.core.util;
|
||||||
|
@ -1118,4 +1119,20 @@ public class XMLparser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interrupt the current KeepAliveRequest thread and restart
|
||||||
|
* the KeepAliveRequest thread with the specified timeout
|
||||||
|
*
|
||||||
|
* @param timeout when the KeepAliveRequest thread is expired
|
||||||
|
* @param socket to wait for
|
||||||
|
*
|
||||||
|
* @since 3.3
|
||||||
|
*/
|
||||||
|
public void resetKeepAliveRequest(long timeout, Socket socket) {
|
||||||
|
if (_kart != null && _kart.isAlive()){
|
||||||
|
_kart.interrupt();
|
||||||
|
}
|
||||||
|
_kart = new KeepAliveRequestThread(timeout, socket);
|
||||||
|
_kart.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue