simconnectioncontext.java

来自「本人历尽千辛万苦找的clustream中的jar包」· Java 代码 · 共 84 行

JAVA
84
字号
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 + =
减小字号Ctrl + -
显示快捷键?