class CassandraJobStore implements JobStore {

    @Override
    public Completable deleteJob(Job job) {
        return Observable.fromCallable(() -> {
            String jobId = job.getId();
            checkIfJobIsActive(jobId);
            return jobId;
        }).flatMap(jobId -> retrieveTasksForJob(jobId).flatMap(tasksAndErrors -> {
            List<Task> tasks = tasksAndErrors.getLeft();

            int errors = tasksAndErrors.getRight();
            if (errors > 0) {
                logger.warn("Some tasks records could not be loaded during the job delete operation. Ignoring them: {}", errors);
            }
            List<Task> fixedTasks = checkTaskConsistency(tasks);

            List<Completable> completables = fixedTasks.stream().map(this::deleteTask).collect(Collectors.toList());
            return Completable.merge(Observable.from(completables), getConcurrencyLimit()).toObservable();
        })).toList().flatMap(ignored -> {
            BatchStatement statement = getArchiveJobBatchStatement(job);

            transactionLogger().logBeforeDelete(deleteActiveJobStatement, "deleteJob", job);

            return execute(statement).doOnNext(rs -> transactionLogger().logAfterDelete(deleteActiveJobStatement, "deleteJob", job));
        }).flatMap(ignored -> {
            activeJobIdsBucketManager.deleteItem(job.getId());
            return Observable.empty();
        }).toCompletable();
    }

    @Inject public  CassandraJobStore(CassandraStoreConfiguration configuration,
                             Session session,
                             TitusRuntime titusRuntime);
      CassandraJobStore(CassandraStoreConfiguration configuration,
                      Session session,
                      TitusRuntime titusRuntime,
                      ObjectMapper mapper,
                      int initialBucketCount,
                      int maxBucketSize);

}