Package org.trellisldp.ext.cassandra
Class CassandraContext
- java.lang.Object
-
- org.trellisldp.ext.cassandra.CassandraContext
-
@ApplicationScoped public class CassandraContext extends Object
-
-
Constructor Summary
Constructors Constructor Description CassandraContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Release resources.voidconnect()Connect to Cassandra, lazily.DefaultConsistencyLevelgetBinaryReadConsistency()DefaultConsistencyLevelgetBinaryWriteConsistency()DefaultConsistencyLevelgetRdfReadConsistency()DefaultConsistencyLevelgetRdfWriteConsistency()CqlSessionsession()
-
-
-
Method Detail
-
getBinaryReadConsistency
@Produces @BinaryReadConsistency public DefaultConsistencyLevel getBinaryReadConsistency()
- Returns:
- the read-consistency to use querying Cassandra binary data
-
getBinaryWriteConsistency
@Produces @BinaryWriteConsistency public DefaultConsistencyLevel getBinaryWriteConsistency()
- Returns:
- the write-consistency to use querying Cassandra binary data
-
getRdfReadConsistency
@Produces @MutableReadConsistency public DefaultConsistencyLevel getRdfReadConsistency()
- Returns:
- the read-consistency to use querying Cassandra RDF data
-
getRdfWriteConsistency
@Produces @MutableWriteConsistency public DefaultConsistencyLevel getRdfWriteConsistency()
- Returns:
- the write-consistency to use querying Cassandra RDF data
-
connect
@PostConstruct public void connect()
Connect to Cassandra, lazily.
-
session
@Produces @ApplicationScoped public CqlSession session()
- Returns:
- a
CqlSessionfor use withCassandraResourceService(andCassandraBinaryService)
-
close
@PreDestroy public void close()
Release resources.
-
-