class PartitionReleaseStrategyFactoryLoader {

	public static PartitionReleaseStrategy.Factory loadPartitionReleaseStrategyFactory(final Configuration configuration) {
		final boolean partitionReleaseDuringJobExecution = configuration.getBoolean(JobManagerOptions.PARTITION_RELEASE_DURING_JOB_EXECUTION);
		if (partitionReleaseDuringJobExecution) {
			return new RegionPartitionReleaseStrategy.Factory();
		} else {
			return new NotReleasingPartitionReleaseStrategy.Factory();
		}
	}

	private  PartitionReleaseStrategyFactoryLoader();

}