当前位置: 首页>>代码示例>>Java>>正文


Java EmbeddedCassandraServerHelper.getNativeTransportPort方法代码示例

本文整理汇总了Java中org.cassandraunit.utils.EmbeddedCassandraServerHelper.getNativeTransportPort方法的典型用法代码示例。如果您正苦于以下问题:Java EmbeddedCassandraServerHelper.getNativeTransportPort方法的具体用法?Java EmbeddedCassandraServerHelper.getNativeTransportPort怎么用?Java EmbeddedCassandraServerHelper.getNativeTransportPort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cassandraunit.utils.EmbeddedCassandraServerHelper的用法示例。


在下文中一共展示了EmbeddedCassandraServerHelper.getNativeTransportPort方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@Override
protected void load() {
    String hostIp = EmbeddedCassandraServerHelper.getHost();
    int port = EmbeddedCassandraServerHelper.getNativeTransportPort();
    cluster = new Cluster.Builder().addContactPoints(hostIp).withPort(port).withSocketOptions(getSocketOptions())
            .build();
    session = cluster.connect();
    CQLDataLoader dataLoader = new CQLDataLoader(session);
    dataSets.forEach(dataLoader::load);
    session = dataLoader.getSession();
}
 
开发者ID:thingsboard,项目名称:thingsboard,代码行数:12,代码来源:CustomCassandraCQLUnit.java

示例2: setupCassandra

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@BeforeClass
public static void setupCassandra() throws ConfigurationException, IOException, TTransportException, InterruptedException {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.CASSANDRA_RNDPORT_YML_FILE);
    binaryPort = EmbeddedCassandraServerHelper.getNativeTransportPort();

    cluster = Cluster.builder()
            .addContactPoints(CASSANDRA_HOSTS)
            .withPort(binaryPort)
            .withCredentials(username, password)
            .build();
    session = cluster.connect();
}
 
开发者ID:sky-uk,项目名称:cqlmigrate,代码行数:13,代码来源:CqlMigratorHealthCheckTest.java

示例3: setupCassandra

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@BeforeClass
public static void setupCassandra() throws ConfigurationException, IOException, TTransportException, InterruptedException {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.CASSANDRA_RNDPORT_YML_FILE);
    binaryPort = EmbeddedCassandraServerHelper.getNativeTransportPort();

    cluster = Cluster.builder().addContactPoints(CASSANDRA_HOSTS).withPort(binaryPort).withCredentials(username, password).build();
    clusterHealth = new ClusterHealth(cluster);
    session = cluster.connect();
}
 
开发者ID:sky-uk,项目名称:cqlmigrate,代码行数:10,代码来源:SchemaUpdatesTest.java

示例4: setupCassandra

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@BeforeClass
public static void setupCassandra() throws ConfigurationException, IOException, TTransportException, InterruptedException {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.CASSANDRA_RNDPORT_YML_FILE, 30000);
    binaryPort = EmbeddedCassandraServerHelper.getNativeTransportPort();

    cluster = Cluster.builder().addContactPoints(CASSANDRA_HOSTS).withPort(binaryPort).withCredentials(username, password).build();
    session = cluster.connect();
}
 
开发者ID:sky-uk,项目名称:cqlmigrate,代码行数:9,代码来源:CqlMigratorImplTest.java

示例5: before

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@Override
public void before() throws Throwable {
    cassandraUnit = new MyCassandraCQLUnit(getDataSet(CASSANDRA_KEYSPACE, 1));
    cassandraUnit.before();
    host = EmbeddedCassandraServerHelper.getHost();
    port = EmbeddedCassandraServerHelper.getNativeTransportPort();
}
 
开发者ID:OpenNMS,项目名称:newts,代码行数:8,代码来源:NewtsInstance.java

示例6: load

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@Override
protected void load() {
  String hostIp = EmbeddedCassandraServerHelper.getHost();
  int port = EmbeddedCassandraServerHelper.getNativeTransportPort();
  cluster = new Cluster.Builder().addContactPoints(hostIp).withPort(port).withSocketOptions(getSocketOptions())
      .build();
  session = cluster.connect();
  CQLDataLoader dataLoader = new CQLDataLoader(session);
  dataLoader.load(dataSet);
  session = dataLoader.getSession();
}
 
开发者ID:kaaproject,项目名称:kaa,代码行数:12,代码来源:CustomCassandraCQLUnit.java

示例7: setupCassandra

import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
public static void setupCassandra() throws ConfigurationException, IOException, TTransportException, InterruptedException {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.CASSANDRA_RNDPORT_YML_FILE);
    binaryPort = EmbeddedCassandraServerHelper.getNativeTransportPort();
    cluster = Cluster.builder().addContactPoints(CASSANDRA_HOSTS).withPort(binaryPort).withCredentials(username, password).build();
    session = cluster.connect();
}
 
开发者ID:sky-uk,项目名称:cqlmigrate,代码行数:7,代码来源:CqlMigrateInvoker.java


注:本文中的org.cassandraunit.utils.EmbeddedCassandraServerHelper.getNativeTransportPort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。