class CassandraJobStore implements JobStore {

    @Override
    public Completable storeTask(Task task) {
        return Observable.fromCallable((Callable<Statement>) () -> {
            String jobId = task.getJobId();
            String taskId = task.getId();
            checkIfJobIsActive(jobId);
            String taskJsonString = ObjectMappers.writeValueAsString(mapper, task);
            Statement taskStatement = insertActiveTaskStatement.bind(taskId, taskJsonString);
            Statement taskIdStatement = insertActiveTaskIdStatement.bind(jobId, taskId);

            BatchStatement batchStatement = new BatchStatement();
            batchStatement.add(taskStatement);
            batchStatement.add(taskIdStatement);

            transactionLogger().logBeforeCreate(insertActiveTaskStatement, "storeTask", task);

            return batchStatement;
        }).flatMap(statement ->
                execute(statement).doOnNext(rs -> transactionLogger().logAfterCreate(insertActiveTaskStatement, "storeTask", task))
        ).toCompletable();
    }

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

}