Bug 180842 Config memory buffer size in data engine execution.
To tuning the performance, it is necessary for DtE to expose API for clients to config the size of memory it used to store the final result set. A new AppContext string, "org.eclipse.birt.data.cache.memory.size" is proposed. The new appcontext entry only accept positive integer as input, the unit of which would be MB.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/cache/CacheUtil.java
{
	/**
	 * how many memory could be used to cached rows in memory when
	 * transformation is done, the minimum value for it is 1M. It is strongly
	 * recommended to give a high value to it so as to get a good performance.
	 * If this value is not set, the default value is 10.
	 */
	public final static String MEMCACHE_ROWNUMBER = "org.eclipse.birt.data.engine.memcache.rownumber";
	private static Integer cacheCounter1 = new Integer( 0 );
	private static Integer cacheCounter2 = new Integer( 0 );
	private String tempDir;
	/**
	 * 
	 * @param context
	 */
	public CacheUtil( String tempDir )
	{
		this.tempDir = tempDir;
	}
	
	/**
	 * @return
	 */
	static int computeCacheSize( )
	{
		
		String memcachesizeOfTest = System.getProperty( "birt.data.engine.test.memcachesize" );
		if ( memcachesizeOfTest != null )
			return Integer.parseInt( memcachesizeOfTest );