class CassandraJobStore implements JobStore {

    @Override
    public Completable replaceTask(Task oldTask, Task newTask) {
        return Observable.fromCallable((Callable<Statement>) () -> {
            String jobId = newTask.getJobId();
            checkIfJobIsActive(jobId);
            String taskId = newTask.getId();
            String taskJsonString = ObjectMappers.writeValueAsString(mapper, newTask);

            BatchStatement batchStatement = getArchiveTaskBatchStatement(oldTask);

            Statement insertTaskStatement = insertActiveTaskStatement.bind(taskId, taskJsonString);
            Statement insertTaskIdStatement = insertActiveTaskIdStatement.bind(jobId, taskId);

            batchStatement.add(insertTaskStatement);
            batchStatement.add(insertTaskIdStatement);

            return batchStatement;
        }).flatMap(this::execute).toCompletable();
    }

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

}