class JobContext {

    public static JobContext from(final CloudJobConfiguration jobConfig, final ExecutionType type) {
        int shardingTotalCount = jobConfig.getTypeConfig().getCoreConfig().getShardingTotalCount();
        List<Integer> shardingItems = new ArrayList<>(shardingTotalCount);
        for (int i = 0; i < shardingTotalCount; i++) {
            shardingItems.add(i);
        }
        return new JobContext(jobConfig, shardingItems, type);
    }

}