本文整理汇总了Java中org.cassandraunit.utils.EmbeddedCassandraServerHelper.cleanEmbeddedCassandra方法的典型用法代码示例。如果您正苦于以下问题:Java EmbeddedCassandraServerHelper.cleanEmbeddedCassandra方法的具体用法?Java EmbeddedCassandraServerHelper.cleanEmbeddedCassandra怎么用?Java EmbeddedCassandraServerHelper.cleanEmbeddedCassandra使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cassandraunit.utils.EmbeddedCassandraServerHelper
的用法示例。
在下文中一共展示了EmbeddedCassandraServerHelper.cleanEmbeddedCassandra方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: stop
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
/**
* Stops the server
*/
public static void stop() {
LOG.info("Checking if the Cassandra server can be stopped");
// stop the server only if there is a server running
if (serverRunning.compareAndSet(true, false)) {
LOG.info("Stopping the Cassandra server");
// clear all data from the cluster
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
// close the cluster and all sessions, and shutdown the embedded server
session.getCluster().close();
LOG.info("Cassandra server stopped");
} else
LOG.info("Cassandra server not running");
}
示例2: stopCassandra
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void stopCassandra() {
//Sometimes cleaning request to EmbeddedCassandra timeouts but it is not a big deal not to clean embeddedCassandra
// because keyspace is dropped and recreated in the initialization of this test. It is better not to break the build
// on slow machines
try {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
} catch (OperationTimedOutException e) {
e.printStackTrace();
}
}
示例3: tearDownClass
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() {
CassandraUtils.deleteTable(ROOT_APP_NAME);
CassandraUtils.deleteTable(appid1);
CassandraUtils.deleteTable(appid2);
CassandraUtils.deleteTable(appid3);
CassandraUtils.shutdownClient();
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例4: clean
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
public synchronized void clean() {
try {
synchronized (CassandraConnector.class) {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
} catch (Throwable ignored) {
}
}
示例5: tearDownClass
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws Exception {
session.execute("DROP KEYSPACE cqlmigrate");
cluster.close();
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
}
示例6: cleanupServer
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void cleanupServer() {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例7: cleanEmbeddedCassandra
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
/**
* Clean embedded Cassandra.
*/
public static void cleanEmbeddedCassandra() throws Exception {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例8: tearDownCassandra
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
public static void tearDownCassandra() throws Exception {
cluster.close();
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
}
示例9: tearDownClass
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws Exception {
cluster.close();
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
}
示例10: afterSuite
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@AfterClass
public static void afterSuite() {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例11: after
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@After
public void after() {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例12: before
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@Before
public void before() {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
示例13: tearDown
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; //导入方法依赖的package包/类
@Override
public void tearDown(ManagementClient managementClient, String containerId) throws Exception {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}