public ClientThread(int id, CyclicBarrier barrier) {
            this.id = id;
            // determine where to push/pull info:
            if(id == 0) {
                req = new int[1];
                req[0] = 1;
                res = new int[1];
                res[0] = 0;
            } else if(id == 1) {
                req = new int[2];
                req[0] = 0;
                req[1] = 3;
                res = new int[2];
                res[0] = 1;
                res[1] = 2;
            } else if(id == 2) {
                req = new int[2];
                req[0] = 2;
                req[1] = 5;
                res = new int[2];
                res[0] = 3;
                res[1] = 4;
            } else {
                req = new int[1];
                req[0] = 4;
                res = new int[1];
                res[0] = 5;
            }
            // Set up the barrier for synchronization:
            this.barrier = barrier;
        }