public static void putResult(String barrierServer, LinkedList<Record> records, Map<Long, LinkedList<Long>> edgeListMap, int blockSize){
		BServer server;
		try {
			server = (BServer) Naming.lookup(barrierServer);
			Result [] results = new Result[blockSize];
			int remainLen = records.size();
			ListIterator<Record> cursorIterator = records.listIterator();
			while(remainLen > 0){
				if(remainLen >= blockSize){
					for(int i=0; i<blockSize; i++){
						Record node = cursorIterator.next();
						results[i] = new Result( node, edgeListMap.get(node.userid));
					}
					server.putResults(results);
					remainLen -= blockSize;
				}
				else if(remainLen > 0){
					results = new Result[remainLen];
					for(int i=0; i<remainLen; i++){
						Record node = cursorIterator.next();
						results[i] = new Result( node, edgeListMap.get(node.userid));
					}
					server.putResults(results);
					remainLen = 0;
				}
			}			
						
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NotBoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
	}