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


Java ReconnectionPolicy类代码示例

本文整理汇总了Java中com.datastax.driver.core.policies.ReconnectionPolicy的典型用法代码示例。如果您正苦于以下问题:Java ReconnectionPolicy类的具体用法?Java ReconnectionPolicy怎么用?Java ReconnectionPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ReconnectionPolicy类属于com.datastax.driver.core.policies包,在下文中一共展示了ReconnectionPolicy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * Parse the reconnection policy.
 */
public static ReconnectionPolicy parseReconnectionPolicy(String reconnectionPolicyString) throws
    InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException,
    SecurityException, IllegalArgumentException, InvocationTargetException {
    String lb_regex = "([a-zA-Z]*Policy)(\\()(.*)(\\))";
    Pattern lb_pattern = Pattern.compile(lb_regex);
    Matcher lb_matcher = lb_pattern.matcher(reconnectionPolicyString);
    if (lb_matcher.matches()) {
        if (lb_matcher.groupCount() > 0) {
            // Primary LB policy has been specified
            String primaryReconnectionPolicy = lb_matcher.group(1);
            String reconnectionPolicyParams = lb_matcher.group(3);
            return getReconnectionPolicy(primaryReconnectionPolicy, reconnectionPolicyParams);
        }
    }
    return null;
}
 
开发者ID:dalbelap,项目名称:flipper-reverse-image-search,代码行数:20,代码来源:CassandraProperties.java

示例2: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * Sets reconnection policy.
 *
 * @param plc Reconnection policy.
 */
@SuppressWarnings("UnusedDeclaration")
public void setReconnectionPolicy(ReconnectionPolicy plc) {
    reconnectionPlc = plc;

    invalidate();
}
 
开发者ID:apache,项目名称:ignite,代码行数:12,代码来源:DataSource.java

示例3: readExternal

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    fetchSize = (Integer)in.readObject();
    readConsistency = (ConsistencyLevel)in.readObject();
    writeConsistency = (ConsistencyLevel)in.readObject();
    user = U.readString(in);
    pwd = U.readString(in);
    port = (Integer)in.readObject();
    contactPoints = (List<InetAddress>)in.readObject();
    contactPointsWithPorts = (List<InetSocketAddress>)in.readObject();
    maxSchemaAgreementWaitSeconds = (Integer)in.readObject();
    protoVer = (Integer)in.readObject();
    compression = U.readString(in);
    useSSL = (Boolean)in.readObject();
    collectMetrix = (Boolean)in.readObject();
    jmxReporting = (Boolean)in.readObject();
    creds = (Credentials)in.readObject();
    loadBalancingPlc = (LoadBalancingPolicy)readObject(in);
    reconnectionPlc = (ReconnectionPolicy)readObject(in);
    addrTranslator = (AddressTranslator)readObject(in);
    speculativeExecutionPlc = (SpeculativeExecutionPolicy)readObject(in);
    authProvider = (AuthProvider)readObject(in);
    sslOptions = (SSLOptions)readObject(in);
    poolingOptions = (PoolingOptions)readObject(in);
    sockOptions = (SocketOptions)readObject(in);
    nettyOptions = (NettyOptions)readObject(in);
}
 
开发者ID:apache,项目名称:ignite,代码行数:29,代码来源:DataSource.java

示例4: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * Sets reconnection policy.
 *
 * @param plc Reconnection policy.
 */
@SuppressWarnings("UnusedDeclaration")
public void setReconnectionPolicy(ReconnectionPolicy plc) {
    this.reconnectionPlc = plc;
    invalidate();
}
 
开发者ID:epam,项目名称:Lagerta,代码行数:11,代码来源:DataSource.java

示例5: getReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public Class<? extends ReconnectionPolicy> getReconnectionPolicy() {
	return this.reconnectionPolicy;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:4,代码来源:CassandraProperties.java

示例6: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public void setReconnectionPolicy(
		Class<? extends ReconnectionPolicy> reconnectionPolicy) {
	this.reconnectionPolicy = reconnectionPolicy;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:CassandraProperties.java

示例7: getReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public ReconnectionPolicy getReconnectionPolicy() {
    return reconnectionPolicy;
}
 
开发者ID:pulsarIO,项目名称:realtime-analytics,代码行数:4,代码来源:CassandraConfig.java

示例8: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
 
开发者ID:pulsarIO,项目名称:realtime-analytics,代码行数:4,代码来源:CassandraConfig.java

示例9: build

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
@Override
public ReconnectionPolicy build() {
    return new ExponentialReconnectionPolicy(baseDelay.toMilliseconds(), maxDelay.toMilliseconds());
}
 
开发者ID:composable-systems,项目名称:dropwizard-cassandra,代码行数:5,代码来源:ExponentialReconnectionPolicyFactory.java

示例10: build

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
@Override
public ReconnectionPolicy build() {
    return new ConstantReconnectionPolicy(delay.toMilliseconds());
}
 
开发者ID:composable-systems,项目名称:dropwizard-cassandra,代码行数:5,代码来源:ConstantReconnectionPolicyFactory.java

示例11: getReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * @return the reconnectionPolicy
 */
public ReconnectionPolicy getReconnectionPolicy() {
	return reconnectionPolicy;
}
 
开发者ID:joef551,项目名称:camel-cql,代码行数:7,代码来源:ClusterBean.java

示例12: getReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public ReconnectionPolicy getReconnectionPolicy() {
	return reconnectionPolicy;
}
 
开发者ID:nea,项目名称:vertx-mod-cassandra-persistor,代码行数:4,代码来源:CassandraPersistor.java

示例13: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
	this.reconnectionPolicy = reconnectionPolicy;
}
 
开发者ID:nea,项目名称:vertx-mod-cassandra-persistor,代码行数:4,代码来源:CassandraPersistor.java

示例14: withReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * Used to decide how to establish a connection to the cluster in case the current one fails.
 * The default if not set is to use an ExponentialRetry Policy.
 * The baseDelay and maxDelay are the two time windows that are used to specify the retry attempts
 * in an exponential manner
 * @param reconnectionPolicy
 * @return The builder instance as initially created updated with this value
 */
public ConnectionBuilder withReconnectionPolicy(ReconnectionPolicy reconnectionPolicy)
{
  this.reconnectionPolicy = reconnectionPolicy;
  return this;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:14,代码来源:ConnectionStateManager.java

示例15: setReconnectionPolicy

import com.datastax.driver.core.policies.ReconnectionPolicy; //导入依赖的package包/类
/**
 * @param reconnectionPolicy
 *            the reconnectionPolicy to set
 */
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
	this.reconnectionPolicy = reconnectionPolicy;
}
 
开发者ID:joef551,项目名称:camel-cql,代码行数:8,代码来源:ClusterBean.java


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