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
throw new IllegalArgumentException( "the value of memcachesize should be at least 10" );
			}
		}
		return memoryCacheSize;
	}
	/**
	 * @param sortSpec
	 * @return Comparator based on specified sortSpec, null indicates there is
	 *         no need to do sorting
	 */
	static Comparator getComparator( SortSpec sortSpec,
			final IEventHandler eventHandler )
	{
		if ( sortSpec == null )
			return null;
		final int[] sortKeyIndexes = sortSpec.sortKeyIndexes;
		final String[] sortKeyColumns = sortSpec.sortKeyColumns;
		if ( sortKeyIndexes == null || sortKeyIndexes.length == 0 )
			return null;
		final boolean[] sortAscending = sortSpec.sortAscending;
		Comparator comparator = new Comparator( ) {
			/**
			 * compares two row indexes, actually compares two rows pointed by
			 * the two row indexes
			 */
			public int compare( Object obj1, Object obj2 )
			{
				IResultObject row1 = (IResultObject) obj1;
				IResultObject row2 = (IResultObject) obj2;