org.apache.zookeeper.data.ACL.deserialize()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(57)

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

ACL.deserialize介绍

暂无

代码示例

代码示例来源:origin: apache/zookeeper

public void readFields(java.io.DataInput in) throws java.io.IOException {
 BinaryInputArchive archive = new BinaryInputArchive(in);
 deserialize(archive, "");
}
public int compareTo (Object peer_) throws ClassCastException {

代码示例来源:origin: org.apache.zookeeper/zookeeper

public void readFields(java.io.DataInput in) throws java.io.IOException {
 BinaryInputArchive archive = new BinaryInputArchive(in);
 deserialize(archive, "");
}
public int compareTo (Object peer_) throws ClassCastException {

代码示例来源:origin: apache/zookeeper

public synchronized void deserialize(InputArchive ia) throws IOException {
  clear();
  int i = ia.readInt("map");
  while (i > 0) {
    Long val = ia.readLong("long");
    if (aclIndex < val) {
      aclIndex = val;
    }
    List<ACL> aclList = new ArrayList<ACL>();
    Index j = ia.startVector("acls");
    if (j == null) {
      throw new RuntimeException("Incorrent format of InputArchive when deserialize DataTree - missing acls");
    }
    while (!j.done()) {
      ACL acl = new ACL();
      acl.deserialize(ia, "acl");
      aclList.add(acl);
      j.incr();
    }
    longKeyMap.put(val, aclList);
    aclKeyMap.put(aclList, val);
    referenceCounter.put(val, new AtomicLongWithEquals(0));
    i--;
  }
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

public synchronized void deserialize(InputArchive ia) throws IOException {
  clear();
  int i = ia.readInt("map");
  while (i > 0) {
    Long val = ia.readLong("long");
    if (aclIndex < val) {
      aclIndex = val;
    }
    List<ACL> aclList = new ArrayList<ACL>();
    Index j = ia.startVector("acls");
    if (j == null) {
      throw new RuntimeException("Incorrent format of InputArchive when deserialize DataTree - missing acls");
    }
    while (!j.done()) {
      ACL acl = new ACL();
      acl.deserialize(ia, "acl");
      aclList.add(acl);
      j.incr();
    }
    longKeyMap.put(val, aclList);
    aclKeyMap.put(aclList, val);
    referenceCounter.put(val, new AtomicLongWithEquals(0));
    i--;
  }
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

public void deserialize(InputArchive archive, String tag)
    throws IOException {
  archive.startRecord("node");
  data = archive.readBuffer("data");
  Index i = archive.startVector("acl");
  if (i != null) {
    acl = new ArrayList<ACL>();
    while (!i.done()) {
      ACL a = new ACL();
      a.deserialize(archive, "aclEntry");
      acl.add(a);
      i.incr();
    }
  }
  archive.endVector("acl");
  stat = new StatPersistedV1();
  stat.deserialize(archive, "stat");
  archive.endRecord("node");
}

代码示例来源:origin: org.apache.hadoop/zookeeper

public void readFields(java.io.DataInput in) throws java.io.IOException {
 BinaryInputArchive archive = new BinaryInputArchive(in);
 deserialize(archive, "");
}
public int compareTo (Object peer_) throws ClassCastException {

代码示例来源:origin: org.apache.hadoop/zookeeper

private void deserializeList(Map<Long, List<ACL>> longKeyMap,
    InputArchive ia) throws IOException {
  int i = ia.readInt("map");
  while (i > 0) {
    Long val = ia.readLong("long");
    if (aclIndex < val) {
      aclIndex = val;
    }
    List<ACL> aclList = new ArrayList<ACL>();
    Index j = ia.startVector("acls");
    while (!j.done()) {
      ACL acl = new ACL();
      acl.deserialize(ia, "acl");
      aclList.add(acl);
      j.incr();
    }
    longKeyMap.put(val, aclList);
    aclKeyMap.put(aclList, val);
    i--;
  }
}

代码示例来源:origin: org.apache.hadoop/zookeeper

public void deserialize(InputArchive archive, String tag)
    throws IOException {
  archive.startRecord("node");
  data = archive.readBuffer("data");
  Index i = archive.startVector("acl");
  if (i != null) {
    acl = new ArrayList<ACL>();
    while (!i.done()) {
      ACL a = new ACL();
      a.deserialize(archive, "aclEntry");
      acl.add(a);
      i.incr();
    }
  }
  archive.endVector("acl");
  stat = new StatPersistedV1();
  stat.deserialize(archive, "stat");
  archive.endRecord("node");
}

相关文章