protected void processVotingResult(String data) {
		String[] splits = data.split(" ");
		Integer nodeId = Integer.parseInt(splits[0]);
		String operation = splits[1];
		String resource = splits[2];
		
		if(operation.compareTo("LOCK") == 0){
			if(resources.containsKey(resource)){
				ResourceState resState = resources.get(resource);
				if(resState.lockStatus == LockStatus.Free){
					resState.lockStatus = LockStatus.Taken;
					resState.owner = nodeId;
					notifyLockClient(nodeId, Status.SUCCESS);
				} else {
					resState.waitList.add(nodeId);
				}
			} else {
				ResourceState resState = new ResourceState(resource);
				resState.lockStatus = LockStatus.Taken;
				resState.owner = nodeId;
				resources.put(resource, resState);
				notifyLockClient(nodeId, Status.SUCCESS);
			}
		} else { // UNLOCK
			// unlock does nothing if the releasing node did not hold the lock
			if(resources.containsKey(resource)){
				ResourceState resState = resources.get(resource);
				if(resState.lockStatus == LockStatus.Taken && resState.owner == nodeId){
					if(resState.waitList.size()>0){
						// lock transitions ownership
						resState.owner = resState.waitList.remove(0);
						// if this node is the new owner tell the client that 
						// it has the lock now
						notifyLockClient(resState.owner, Status.SUCCESS);	
						// tell the releasing node that it succeeded
						notifyLockClient(nodeId, Status.SUCCESS);
					} else {
						resState.lockStatus = LockStatus.Free;
						resState.owner = -1;
						notifyLockClient(nodeId, Status.SUCCESS);								
					}
				} else {
					notifyLockClient(nodeId, Status.LockNotHeld);
				}
			} 
		}
	}