io.automatiko.engine.addons.persistence.AbstractProcessInstancesFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of automatiko-cassandra-persistence-addon Show documentation
Show all versions of automatiko-cassandra-persistence-addon Show documentation
Apache Cassandra based persistence for Automatiko Engine
package io.automatiko.engine.addons.persistence;
import java.util.Optional;
import com.datastax.oss.driver.api.core.CqlSession;
import io.automatiko.engine.addons.persistence.cassandra.CassandraProcessInstances;
import io.automatiko.engine.api.Model;
import io.automatiko.engine.api.workflow.Process;
import io.automatiko.engine.api.workflow.ProcessInstancesFactory;
/**
* This class must always have exact FQCN as
* io.automatiko.engine.addons.persistence.AbstractProcessInstancesFactory
*
*/
public abstract class AbstractProcessInstancesFactory implements ProcessInstancesFactory {
protected CqlSession cqlSession;
protected Optional createKeyspace;
protected Optional createTables;
protected Optional keyspace;
public AbstractProcessInstancesFactory() {
}
public AbstractProcessInstancesFactory(CqlSession cqlSession, Optional createKeyspace,
Optional createTables, Optional keyspace) {
this.cqlSession = cqlSession;
this.createKeyspace = createKeyspace;
this.createTables = createTables;
this.keyspace = keyspace;
}
@SuppressWarnings("unchecked")
public CassandraProcessInstances createProcessInstances(Process> process) {
return new CassandraProcessInstances((Process extends Model>) process, cqlSession, codec(),
transactionLogStore(), auditor(), createKeyspace, createTables, keyspace);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy