broadcast.java
来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 84 行
JAVA
84 行
/* * project: RebecaSim * package: broker * file: Broadcast.java * * version: 0.1 * date: 10.05.2005 * * This software is part of the diploma thesis "Ein adaptives Brokernetz * für Publish/Subscribe Systeme". */package com;import broker.BloomFilter;import broker.Broker;/** * This class implements a broadcast message the brokers use to get * information about their local environment. * * @version 10.05.2005 * @author parzy */public class Broadcast extends Message{ /** * The Bloom filter containing the initiator's cache. */ public final BloomFilter bloomFilter; /** * The network path, this message already travelled. */ public final Broker[] path; /** * Creates a new broadcast message with the specified Bloom Filter * and an empty path. * @param bloomFilter the Bloom Filter containing the initiator's cache. */ public Broadcast(BloomFilter bloomFilter){ this(new Broker[0], bloomFilter); } /** * Creates a new broadcast message with the specified Bloom Filter * and path. * @param path the network path. * @param bloomFilter the Bloom Filter containing the initiator's cache. */ public Broadcast(Broker[] path, BloomFilter bloomFilter){ this(path, bloomFilter, Message.HEURISTIC); } /** * Creates a new broadcast message with the specified Bloom Filter * and path. * @param path the network path. * @param bloomFilter the Bloom Filter containing the initiator's cache. */ public Broadcast(Broker[] path, BloomFilter bloomFilter, int type){ super(type); this.bloomFilter = bloomFilter; this.path = path; } /** * Returns the broadcast's Bloom filter. * @return the broadcast's Bloom filter. */ public BloomFilter getBloomFilter(){ return bloomFilter; } /** * Returns the broadcast's path. * @return the broadcast's path. */ public Broker[] getPath(){ return path; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?