public static MessageId makeId(Map<Long, Long> anchorsToIds) { return new MessageId(anchorsToIds); }
public static MessageId makeId(Map<Long, Long> anchorsToIds) { return new MessageId(anchorsToIds); }
public static MessageId makeRootId(long id, long val) { Map<Long, Long> anchorsToIds = new HashMap<>(); anchorsToIds.put(id, val); return new MessageId(anchorsToIds); }
public static MessageId makeRootId(long id, long val) { Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); anchorsToIds.put(id, val); return new MessageId(anchorsToIds); }
public static MessageId deserialize(DataInputStream in) throws IOException { int numAnchors = WritableUtils.readVInt(in); Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); for(int i=0; i<numAnchors; i++) { anchorsToIds.put(in.readLong(), in.readLong()); } return new MessageId(anchorsToIds); } }
public static MessageId deserialize(Input in) throws IOException { int numAnchors = in.readInt(true); if (numAnchors == 0) { return null; } Map<Long, Long> anchorsToIds = new HashMap<>(); for (int i = 0; i < numAnchors; i++) { anchorsToIds.put(in.readLong(), in.readLong()); } return new MessageId(anchorsToIds); } }
public static MessageId makeId(Map<Long, Long> anchorsToIds) { return new MessageId(anchorsToIds); }
public static MessageId makeId(Map<Long, Long> anchorsToIds) { return new MessageId(anchorsToIds); }
public static MessageId makeRootId(long id, long val) { Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); anchorsToIds.put(id, val); return new MessageId(anchorsToIds); }
public static MessageId makeRootId(long id, long val) { Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); anchorsToIds.put(id, val); return new MessageId(anchorsToIds); }
public static MessageId deserialize(Input in) throws IOException { int numAnchors = in.readInt(true); if (numAnchors == 0) { return null; } Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); for (int i = 0; i < numAnchors; i++) { anchorsToIds.put(in.readLong(), in.readLong()); } return new MessageId(anchorsToIds); } }
public static MessageId deserialize(Input in) throws IOException { int numAnchors = in.readInt(true); Map<Long, Long> anchorsToIds = new HashMap<Long, Long>(); for(int i=0; i<numAnchors; i++) { anchorsToIds.put(in.readLong(), in.readLong()); } return new MessageId(anchorsToIds); } }