BufferedImage getSparkLine(String host, String service, String selectedDataSourceName, int width, int height, boolean withMeta)
	{
		performanceDataSemaphore.acquireUninterruptibly();

		java.util.List<DataSource> dataSourcesIn = getPerformanceData(host, service);
		java.util.List<DataSource> dataSources = new ArrayList<DataSource>();
		if (dataSourcesIn == null)
		{
			performanceDataSemaphore.release();
			return null;
		}

		for(DataSource dataSource : dataSourcesIn)
		{
			if (selectedDataSourceName != null && dataSource.getDataSourceName().equals(selectedDataSourceName) == false)
				continue;

			dataSources.add(dataSource);
		}

		BufferedImage output = drawGraph(dataSources, width, height, withMeta);

		performanceDataSemaphore.release();

		return output;
	}