📄 simconnectioncontext.java
字号:
package org.osu.ogsa.stream.util;import java.rmi.Remote;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;public class SimConnectionContext extends Object{ public String senderHostName = null; public int senderPort = -1; public String rcverHostName = null; public int rcverPort = -1; public String strId = null; public int iStep = -1; public int ioBufferIndex = -1; // the following parameters for monitor service public int in_or_out = -1; public boolean bValid; public MonitorNotification monitor = null; public java.rmi.Remote monitorPortType = null; public String strNeighborMonitorHandle = null; //as an Index public int nCorrespondingStage = -1; public int nCorrespondingPlacement = -1; private int numNotifications = 0; private boolean bTaskThreadWaken = false; private static Log log = LogFactory.getLog(SimConnectionContext.class.getName()); public SimConnectionContext(String strNeighborMonitorHandle, int nStage, int nPlacement, java.rmi.Remote porttype, MonitorNotification monitor, int in_or_out) { this.strNeighborMonitorHandle = strNeighborMonitorHandle;// this.monitor = monitor; this.in_or_out = in_or_out; nCorrespondingStage = nStage; nCorrespondingPlacement = nPlacement; this.monitor = monitor; monitorPortType = porttype; bValid = true; } public SimConnectionContext() { bValid = true; } public synchronized void resetNumofNotifications() { numNotifications = 0; } public synchronized void wakeupThread() { try{ log.debug("waking the sleeping ResMonitorTask to check bottlenecks"); numNotifications ++; if(!bTaskThreadWaken ) notify(); } catch(Exception e) { log.error(e); } } public synchronized void taskThreadWaken() { bTaskThreadWaken = true; } public synchronized void taskThreadSleeping() { bTaskThreadWaken = false; } public synchronized boolean isBufOverloaded() { if(numNotifications > 0) return true; else return false; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -