@UriEndpoint(scheme="cql", title="Cassandra CQL", syntax="cql:beanRef:hosts:port/keyspace", consumerClass=CassandraConsumer.class, label="database,nosql") public class CassandraEndpoint extends org.apache.camel.impl.DefaultEndpoint
Constructor and Description |
---|
CassandraEndpoint(String uri,
CassandraComponent component,
com.datastax.driver.core.Cluster cluster,
com.datastax.driver.core.Session session,
String keyspace) |
CassandraEndpoint(String endpointUri,
org.apache.camel.Component component) |
Modifier and Type | Method and Description |
---|---|
protected com.datastax.driver.core.Cluster.Builder |
createClusterBuilder() |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
protected void |
doStop() |
protected void |
fillMessage(com.datastax.driver.core.ResultSet resultSet,
org.apache.camel.Message message)
Copy ResultSet into Message.
|
String |
getBean() |
String |
getBeanRef()
Deprecated.
|
com.datastax.driver.core.Cluster |
getCluster() |
String |
getClusterName() |
com.datastax.driver.core.ConsistencyLevel |
getConsistencyLevel() |
String |
getCql() |
String |
getHosts() |
String |
getKeyspace() |
String |
getLoadBalancingPolicy()
To use a specific LoadBalancingPolicy
|
String |
getPassword() |
Integer |
getPort() |
ResultSetConversionStrategy |
getResultSetConversionStrategy() |
com.datastax.driver.core.Session |
getSession() |
protected CassandraSessionHolder |
getSessionHolder() |
String |
getUsername() |
boolean |
isPrepareStatements() |
boolean |
isSingleton() |
protected com.datastax.driver.core.PreparedStatement |
prepareStatement()
Create and configure a Prepared CQL statement
|
protected com.datastax.driver.core.PreparedStatement |
prepareStatement(String cql)
Create and configure a Prepared CQL statement
|
void |
setBean(String beanRef)
Instead of using a hostname:port, refer to an existing configured Session or Cluster from the Camel registry to be used.
|
void |
setBeanRef(String beanRef)
Deprecated.
|
void |
setCluster(com.datastax.driver.core.Cluster cluster)
To use the Cluster instance (you would normally not use this option)
|
void |
setClusterName(String clusterName)
Cluster name
|
void |
setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel)
Consistency level to use
|
void |
setCql(String cql)
CQL query to perform.
|
void |
setHosts(String hosts)
Hostname(s) cassansdra server(s).
|
void |
setKeyspace(String keyspace)
Keyspace to use
|
void |
setLoadBalancingPolicy(String loadBalancingPolicy) |
void |
setPassword(String password)
Password for session authentication
|
void |
setPort(Integer port)
Port number of cassansdra server(s)
|
void |
setPrepareStatements(boolean prepareStatements)
Whether to use PreparedStatements or regular Statements
|
void |
setResultSetConversionStrategy(ResultSetConversionStrategy resultSetConversionStrategy)
To use a custom class that implements logic for converting ResultSet into message body ALL, ONE, LIMIT_10, LIMIT_100...
|
void |
setSession(com.datastax.driver.core.Session session)
To use the Session instance (you would normally not use this option)
|
void |
setUsername(String username)
Username for session authentication
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public CassandraEndpoint(String endpointUri, org.apache.camel.Component component)
public CassandraEndpoint(String uri, CassandraComponent component, com.datastax.driver.core.Cluster cluster, com.datastax.driver.core.Session session, String keyspace)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultEndpoint
Exception
protected CassandraSessionHolder getSessionHolder()
protected com.datastax.driver.core.Cluster.Builder createClusterBuilder() throws Exception
Exception
protected com.datastax.driver.core.PreparedStatement prepareStatement(String cql)
protected com.datastax.driver.core.PreparedStatement prepareStatement()
protected void fillMessage(com.datastax.driver.core.ResultSet resultSet, org.apache.camel.Message message)
public String getBean()
public void setBean(String beanRef)
@Deprecated public String getBeanRef()
@Deprecated public void setBeanRef(String beanRef)
public String getHosts()
public void setHosts(String hosts)
public Integer getPort()
public void setPort(Integer port)
public String getKeyspace()
public void setKeyspace(String keyspace)
public String getCql()
public void setCql(String cql)
public com.datastax.driver.core.Cluster getCluster()
public void setCluster(com.datastax.driver.core.Cluster cluster)
public com.datastax.driver.core.Session getSession()
public void setSession(com.datastax.driver.core.Session session)
public String getClusterName()
public void setClusterName(String clusterName)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public com.datastax.driver.core.ConsistencyLevel getConsistencyLevel()
public void setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel)
public ResultSetConversionStrategy getResultSetConversionStrategy()
public void setResultSetConversionStrategy(ResultSetConversionStrategy resultSetConversionStrategy)
public boolean isPrepareStatements()
public void setPrepareStatements(boolean prepareStatements)
public String getLoadBalancingPolicy()
public void setLoadBalancingPolicy(String loadBalancingPolicy)
Apache Camel