org.jgroups.util.Util.setFlag()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.jgroups.util.Util.setFlag()方法的一些代码示例,展示了Util.setFlag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.setFlag()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:setFlag

Util.setFlag介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

/**
 * Only used to compare a long against a range in a TreeSet / TreeMap. Used to find a range given a seqno
 * @param num
 * @param dummy
 */
public Seqno(long num, boolean dummy) {
  low=num;
  if(dummy)
    flags=Util.setFlag(flags, DUMMY);
}

代码示例来源:origin: wildfly/wildfly

public Rsp<T> setReceived() {
  this.flags=Util.setFlag(flags, RECEIVED);
  return this;
}

代码示例来源:origin: wildfly/wildfly

public void set(long num) {
  if(low == num)
    flags=Util.setFlag(flags, RECEIVED);
}

代码示例来源:origin: wildfly/wildfly

public PingData coord(boolean c) {
  if(c) {
    flags=Util.setFlag(flags, is_coord);
    flags=Util.setFlag(flags, is_server); // coord has to be a server
  }
  else
    flags=Util.clearFlags(flags, is_coord);
  return this;
}

代码示例来源:origin: wildfly/wildfly

public PingData server(boolean c) {
  if(c)
    flags=Util.setFlag(flags, is_server);
  else
    flags=Util.clearFlags(flags, is_server);
  return this;
}

代码示例来源:origin: wildfly/wildfly

public Rsp<T> setException(Throwable t) {
  if(t != null) {
    this.value=t;
    setReceived();
    this.flags=Util.setFlag(flags, IS_EXCEPTION);
  }
  return this;
}

代码示例来源:origin: wildfly/wildfly

public boolean setSuspected() {
  boolean changed=!wasSuspected();
  this.flags=Util.setFlag(flags, SUSPECTED);
  return changed;
}

代码示例来源:origin: wildfly/wildfly

public boolean setUnreachable() {
  boolean changed=!wasUnreachable();
  this.flags=Util.setFlag(flags, UNREACHABLE);
  return changed;
}

代码示例来源:origin: wildfly/wildfly

flags=Util.setFlag(flags,Address.NULL);
  out.writeByte(flags);
  return;
  Class<? extends Address> clazz=addr.getClass();
  if(clazz.equals(UUID.class))
    flags=Util.setFlag(flags,Address.UUID_ADDR);
  else if(clazz.equals(SiteUUID.class))
    flags=Util.setFlag(flags,Address.SITE_UUID);
  else if(clazz.equals(SiteMaster.class))
    flags=Util.setFlag(flags,Address.SITE_MASTER);
  else
    streamable_addr=false;
  flags=Util.setFlag(flags,Address.IP_ADDR);
else if(addr.getClass().equals(IpAddressUUID.class))
  flags=Util.setFlag(flags, Address.IP_ADDR_UUID);
else
  streamable_addr=false;

代码示例来源:origin: wildfly/wildfly

leading=Util.setFlag(leading, DEST_SET);
leading=Util.setFlag(leading, SRC_SET);
leading=Util.setFlag(leading, BUF_SET);

代码示例来源:origin: wildfly/wildfly

leading=Util.setFlag(leading, SRC_SET);
leading=Util.setFlag(leading, BUF_SET);

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Only used to compare a long against a range in a TreeSet / TreeMap. Used to find a range given a seqno
 * @param num
 * @param dummy
 */
public Seqno(long num, boolean dummy) {
  low=num;
  if(dummy)
    flags=Util.setFlag(flags, DUMMY);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Rsp<T> setReceived() {
  this.flags=Util.setFlag(flags, RECEIVED);
  return this;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void set(long num) {
  if(low == num)
    flags=Util.setFlag(flags, RECEIVED);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public PingData coord(boolean c) {
  if(c) {
    flags=Util.setFlag(flags, is_coord);
    flags=Util.setFlag(flags, is_server); // coord has to be a server
  }
  else
    flags=Util.clearFlags(flags, is_coord);
  return this;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public boolean setUnreachable() {
  boolean changed=!wasUnreachable();
  this.flags=Util.setFlag(flags, UNREACHABLE);
  return changed;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public boolean setSuspected() {
  boolean changed=!wasSuspected();
  this.flags=Util.setFlag(flags, SUSPECTED);
  return changed;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Rsp<T> setException(Throwable t) {
  if(t != null) {
    this.value=t;
    setReceived();
    this.flags=Util.setFlag(flags, IS_EXCEPTION);
  }
  return this;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public PingData server(boolean c) {
  if(c)
    flags=Util.setFlag(flags, is_server);
  else
    flags=Util.clearFlags(flags, is_server);
  return this;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

leading=Util.setFlag(leading, DEST_SET);
leading=Util.setFlag(leading, SRC_SET);
leading=Util.setFlag(leading, BUF_SET);

相关文章

Util类方法