lock.java

来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 73 行

JAVA
73
字号
package com;import broker.Broker;/** * The lock message. * @author parzy */public class Lock extends Message {	/**	 * The path to lock.	 */	public final Broker[] path;		/**	 * First node of the old edge on the path.	 */	public final Broker bX;		/**	 * Second node of the old edge on the path.	 */	public final Broker bY;	/**	 * Creates a new lock message.	 * @param path the path to lock.	 * @param bX the first node of the old edge on the path.	 * @param bY the second node of the old edge on the path.	 */	public Lock(Broker[] path, Broker bX, Broker bY){		this(path, bX, bY, Message.RECONFIGURATION);	}		/**	 * Creates a new lock message.	 * @param path the path to lock.	 * @param bX the first node of the old edge on the path.	 * @param bY the second node of the old edge on the path.	 */	public Lock(Broker[] path, Broker bX, Broker bY, int type){		super(type);		this.path = path;		this.bX = bX;		this.bY = bY;	}	/**	 * Returns the path to lock.	 * @return the path to lock.	 */	public Broker[] getPath(){		return path;	}		/**	 * Returns the first node of the old edge on the path.	 * @return the first node of the old edge on the path.	 */	public Broker getBX(){		return bX;	}		/**	 * Returns the second node of the old edge on the path.	 * @return the second node of the old edge on the path.	 */	public Broker getBY(){		return bY;	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?