Пример #1
0
 /**
  * Removes a host from this network record
  *
  * @param host: MAC address as MACAddress
  * @return boolean: true: removed, false: host not found
  */
 public boolean removeHost(MACAddress host) {
   Iterator<MACAddress> iter = this.hosts.iterator();
   while (iter.hasNext()) {
     MACAddress element = iter.next();
     if (element.equals(host)) {
       // assuming MAC address for host is unique
       iter.remove();
       return true;
     }
   }
   return false;
 }
Пример #2
0
  @Override
  public String toString() {
    String str =
        "[ "
            + src.toString()
            + " "
            + dst.toString()
            + " "
            + expectedPktCnt
            + " "
            + varPktCnt
            + " "
            + expectedByteCnt
            + " "
            + varByteCnt
            + " ]";

    return str;
  }
Пример #3
0
  public LBVip() {
    this.id = String.valueOf((int) (Math.random() * 10000));
    this.name = null;
    this.tenantId = null;
    this.netId = null;
    this.address = 0;
    this.protocol = 0;
    this.lbMethod = 0;
    this.port = 0;
    this.pools = new ArrayList<String>();
    this.sessionPersistence = false;
    this.connectionLimit = 0;
    this.address = 0;
    this.status = 0;

    this.proxyMac = MACAddress.valueOf(LB_PROXY_MAC);
  }