ServerViewController extends ViewController { public byte[] executeUpdates(int cid) { List<Integer> jSet = new LinkedList<>(); List<Integer> rSet = new LinkedList<>(); int f = -1; List<String> jSetInfo = new LinkedList<>(); for (int i = 0; i < updates.size(); i++) { ReconfigureRequest request = (ReconfigureRequest) TOMUtil.getObject(updates.get(i).getContent()); Iterator<Integer> it = request.getProperties().keySet().iterator(); while (it.hasNext()) { int key = it.next(); String value = request.getProperties().get(key); if (key == ADD_SERVER) { StringTokenizer str = new StringTokenizer(value, ":"); if (str.countTokens() > 2) { int id = Integer.parseInt(str.nextToken()); if (!isCurrentViewMember(id) && !contains(id, jSet)) { jSetInfo.add(value); jSet.add(id); String host = str.nextToken(); int port = Integer.valueOf(str.nextToken()); this.getStaticConf().addHostInfo(id, host, port); } } } else if (key == REMOVE_SERVER) { if (isCurrentViewMember(Integer.parseInt(value))) { rSet.add(Integer.parseInt(value)); } } else if (key == CHANGE_F) { f = Integer.parseInt(value); } } } return reconfigure(jSetInfo, jSet, rSet, f, cid); } ServerViewController(int procId);  ServerViewController(int procId, String configHome); void setTomLayer(TOMLayer tomLayer); boolean isInCurrentView(); int[] getCurrentViewOtherAcceptors(); int[] getCurrentViewAcceptors(); boolean hasUpdates(); void enqueueUpdate(TOMMessage up); byte[] executeUpdates(int cid); TOMMessage[] clearUpdates(); boolean isInLastJoinSet(int id); void processJoinResult(ReconfigureReply r); @Override final void reconfigureTo(View newView); int getQuorum(); static final int ADD_SERVER; static final int REMOVE_SERVER; static final int CHANGE_F; }
@Test public void testExecuteUpdates() { fail("Not yet implemented"); }