code: public void setAllocatedResource(final AllocatedResource allocatedResource) {
  
  		if (allocatedResource == null) {
  			throw new IllegalArgumentException("Argument allocatedResource must not be null");
  		}
  
  		final AllocatedResource previousResource = this.allocatedResource.getAndSet(allocatedResource);
  		if (previousResource != null) {
  			previousResource.removeVertexFromResource(this);
  		}
  
  		allocatedResource.assignVertexToResource(this);
  
  		// Notify all listener objects
  		final Iterator<VertexAssignmentListener> it = this.vertexAssignmentListeners.iterator();
  		while (it.hasNext()) {
  			it.next().vertexAssignmentChanged(this.vertexID, allocatedResource);
  		}
  	}
docs: Assigns the execution vertex with an {@link AllocatedResource}.
  
  @param allocatedResource
  the resources which are supposed to be allocated to this vertex