class CassandraJobStore implements JobStore {

    @Override
    public Observable<Task> retrieveArchivedTask(String taskId) {
        return retrieveEntityById(taskId, Task.class, retrieveArchivedTaskStatement)
                .switchIfEmpty(retrieveEntityById(taskId, Task.class, retrieveActiveTaskStatement)
                        .filter(task -> task.getStatus().getState() == TaskState.Finished)
                )
                .switchIfEmpty(Observable.error(JobStoreException.taskDoesNotExist(taskId)));
    }

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

}