本文整理汇总了Java中com.datastax.driver.core.CloseFuture类的典型用法代码示例。如果您正苦于以下问题:Java CloseFuture类的具体用法?Java CloseFuture怎么用?Java CloseFuture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CloseFuture类属于com.datastax.driver.core包,在下文中一共展示了CloseFuture类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: stop
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
public void stop() throws Exception {
LOG.info("Attempting to shutdown TinkerPop cluster connection.");
CloseFuture future = cluster.closeAsync();
try {
future.get(shutdownTimeout.toMilliseconds(), TimeUnit.MILLISECONDS);
} catch (TimeoutException ex) {
LOG.warn("Unable to close TinkerPop cluster after {}", shutdownTimeout);
}
}
开发者ID:experoinc,项目名称:dropwizard-dsegraph,代码行数:11,代码来源:DseGraphManaged.java
示例2: stop
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
@Override
public void stop() throws Exception {
LOG.debug("Attempting graceful shutdown of Cassandra cluster: {}", cluster.getClusterName());
CloseFuture future = cluster.closeAsync();
try {
future.get(shutdownGracePeriod.toMilliseconds(), TimeUnit.MILLISECONDS);
} catch (TimeoutException e) {
LOG.warn("Cassandra cluster did not close in {}. Forcing it now.", shutdownGracePeriod);
future.force();
}
}
开发者ID:composable-systems,项目名称:dropwizard-cassandra,代码行数:12,代码来源:CassandraManager.java
示例3: shutdown
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
public Future<Void> shutdown() {
final CloseFuture future = m_session.closeAsync();
return new Future<Void>() {
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
return future.cancel(mayInterruptIfRunning);
}
@Override
public boolean isCancelled() {
return future.isCancelled();
}
@Override
public boolean isDone() {
return future.isDone();
}
@Override
public Void get() throws InterruptedException, ExecutionException {
return future.get();
}
@Override
public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
return future.get(timeout, unit);
}
};
}
开发者ID:OpenNMS,项目名称:newts,代码行数:33,代码来源:CassandraSessionImpl.java
示例4: closeAsync
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
@Override public CloseFuture closeAsync() {
return delegate.closeAsync();
}
开发者ID:openzipkin,项目名称:brave-cassandra,代码行数:4,代码来源:TracingSession.java
示例5: closeAsync
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
@Override
public CloseFuture closeAsync() {
return session.closeAsync();
}
开发者ID:dd00f,项目名称:ibm-performance-monitor,代码行数:5,代码来源:ProfiledSession.java
示例6: closeAsync
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
public CloseFuture closeAsync() {
return session.closeAsync();
}
开发者ID:brianmhess,项目名称:cassandra-loader,代码行数:4,代码来源:EnhancedSession.java
示例7: closeAsync
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
@Override
public CloseFuture closeAsync() {
throw new UnsupportedOperationException("Do not close the sessions handed out from CassandraSupport");
}
开发者ID:nsoft,项目名称:jesterj,代码行数:5,代码来源:CassandraSupport.java
示例8: closeAsync
import com.datastax.driver.core.CloseFuture; //导入依赖的package包/类
public CloseFuture closeAsync() {
return sessionRef.get().closeAsync();
}
开发者ID:1and1,项目名称:Troilus,代码行数:4,代码来源:SessionReplacedTest.java
注:本文中的com.datastax.driver.core.CloseFuture类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论