Added created threads to thread groups to assist with profiling

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3028 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-06-05 14:35:10 +00:00
parent 7040d1befe
commit 576b4a107a
4 changed files with 17 additions and 5 deletions

View File

@@ -46,6 +46,10 @@ public class FTPNetworkServer extends NetworkFileServer implements Runnable
// Constants // Constants
// //
// Session Thread group
private static final ThreadGroup THREAD_GROUP_SESSION = new ThreadGroup("FTP_SESSION_GROUP");
// Server version // Server version
private static final String ServerVersion = "3.5.0"; private static final String ServerVersion = "3.5.0";
@@ -446,7 +450,7 @@ public class FTPNetworkServer extends NetworkFileServer implements Runnable
// Start the new session in a seperate thread // Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess); Thread srvThread = new Thread(THREAD_GROUP_SESSION, srvSess);
srvThread.setDaemon(true); srvThread.setDaemon(true);
srvThread.setName("Sess_FTP" + srvSess.getSessionId() + "_" srvThread.setName("Sess_FTP" + srvSess.getSessionId() + "_"
+ sessSock.getInetAddress().getHostAddress()); + sessSock.getInetAddress().getHostAddress());

View File

@@ -29,6 +29,8 @@ import org.alfresco.filesys.smb.mailslot.TcpipNetBIOSHostAnnouncer;
*/ */
public class NetBIOSSessionSocketHandler extends SessionSocketHandler public class NetBIOSSessionSocketHandler extends SessionSocketHandler
{ {
// Session Thread group
private static final ThreadGroup THREAD_GROUP_SESSION = new ThreadGroup("NETBIOS_SESSION_GROUP");
/** /**
* Class constructor * Class constructor
@@ -96,7 +98,7 @@ public class NetBIOSSessionSocketHandler extends SessionSocketHandler
// Start the new session in a seperate thread // Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess); Thread srvThread = new Thread(THREAD_GROUP_SESSION, srvSess);
srvThread.setDaemon(true); srvThread.setDaemon(true);
srvThread.setName("Sess_N" + srvSess.getSessionId() + "_" srvThread.setName("Sess_N" + srvSess.getSessionId() + "_"
+ sessSock.getInetAddress().getHostAddress()); + sessSock.getInetAddress().getHostAddress());

View File

@@ -28,6 +28,8 @@ import org.alfresco.filesys.smb.TcpipSMB;
*/ */
public class TcpipSMBSessionSocketHandler extends SessionSocketHandler public class TcpipSMBSessionSocketHandler extends SessionSocketHandler
{ {
// Session Thread group
private static final ThreadGroup THREAD_GROUP_SESSION = new ThreadGroup("SMB_SESSION_GROUP");
/** /**
* Class constructor * Class constructor
@@ -95,7 +97,7 @@ public class TcpipSMBSessionSocketHandler extends SessionSocketHandler
// Start the new session in a seperate thread // Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess); Thread srvThread = new Thread(THREAD_GROUP_SESSION, srvSess);
srvThread.setDaemon(true); srvThread.setDaemon(true);
srvThread.setName("Sess_T" + srvSess.getSessionId() + "_" srvThread.setName("Sess_T" + srvSess.getSessionId() + "_"
+ sessSock.getInetAddress().getHostAddress()); + sessSock.getInetAddress().getHostAddress());

View File

@@ -53,6 +53,10 @@ public class Win32NetBIOSSessionSocketHandler extends SessionSocketHandler imple
// Constants // Constants
// //
// Session Thread group
private static final ThreadGroup THREAD_GROUP_SESSION = new ThreadGroup("W32NETBIOS_SESSION_GROUP");
// Default LANA offline polling interval // Default LANA offline polling interval
public static final long LANAPollingInterval = 5000; // 5 seconds public static final long LANAPollingInterval = 5000; // 5 seconds
@@ -605,7 +609,7 @@ public class Win32NetBIOSSessionSocketHandler extends SessionSocketHandler imple
// Start the new session in a seperate thread // Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess); Thread srvThread = new Thread(THREAD_GROUP_SESSION, srvSess);
srvThread.setDaemon(true); srvThread.setDaemon(true);
srvThread.setName("Sess_W" + srvSess.getSessionId() + "_LSN" + lsn); srvThread.setName("Sess_W" + srvSess.getSessionId() + "_LSN" + lsn);
srvThread.start(); srvThread.start();
@@ -750,7 +754,7 @@ public class Win32NetBIOSSessionSocketHandler extends SessionSocketHandler imple
// Start the new session in a seperate thread // Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess); Thread srvThread = new Thread(THREAD_GROUP_SESSION, srvSess);
srvThread.setDaemon(true); srvThread.setDaemon(true);
srvThread.setName("Sess_WS" + srvSess.getSessionId()); srvThread.setName("Sess_WS" + srvSess.getSessionId());
srvThread.start(); srvThread.start();