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


Java RetryPolicy类代码示例

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


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

示例1: AstyanaxKeyColumnValueStore

import com.netflix.astyanax.retry.RetryPolicy; //导入依赖的package包/类
AstyanaxKeyColumnValueStore(String columnFamilyName,
                            Keyspace keyspace,
                            AstyanaxStoreManager storeManager,
                            RetryPolicy retryPolicy) {
    this.keyspace = keyspace;
    this.columnFamilyName = columnFamilyName;
    this.retryPolicy = retryPolicy;
    this.storeManager = storeManager;

    entryGetter = new AstyanaxGetter(storeManager.getMetaDataSchema(columnFamilyName));

    columnFamily = new ColumnFamily<ByteBuffer, ByteBuffer>(
            this.columnFamilyName,
            ByteBufferSerializer.get(),
            ByteBufferSerializer.get());

}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:18,代码来源:AstyanaxKeyColumnValueStore.java

示例2: getRetryPolicy

import com.netflix.astyanax.retry.RetryPolicy; //导入依赖的package包/类
private static RetryPolicy getRetryPolicy(String serializedRetryPolicy) throws BackendException {
    String[] tokens = serializedRetryPolicy.split(",");
    String policyClassName = tokens[0];
    int argCount = tokens.length - 1;
    Integer[] args = new Integer[argCount];
    for (int i = 1; i < tokens.length; i++) {
        args[i - 1] = Integer.valueOf(tokens[i]);
    }

    try {
        RetryPolicy rp = instantiate(policyClassName, args, serializedRetryPolicy);
        log.debug("Instantiated RetryPolicy object {} from config string \"{}\"", rp, serializedRetryPolicy);
        return rp;
    } catch (Exception e) {
        throw new PermanentBackendException("Failed to instantiate Astyanax Retry Policy class", e);
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:18,代码来源:AstyanaxStoreManager.java

示例3: executeWithFailover

import com.netflix.astyanax.retry.RetryPolicy; //导入依赖的package包/类
@Override
public <R> OperationResult<R> executeWithFailover(Operation<T, R> operation, RetryPolicy retryPolicy)
        throws ConnectionException, OperationException {
    Operation<T, R> pinnedOperation = new AbstractOperationFilter<T, R>(operation) {
        @Override
        public Host getPinnedHost() {
            return _host;
        }
    };

    return _delegate.executeWithFailover(pinnedOperation, retryPolicy);
}
 
开发者ID:bazaarvoice,项目名称:emodb,代码行数:13,代码来源:PinnedConnectionPool.java

示例4: getRetryPolicy

import com.netflix.astyanax.retry.RetryPolicy; //导入依赖的package包/类
@Override
public RetryPolicy getRetryPolicy() {
    return retryPolicy;
}
 
开发者ID:Netflix,项目名称:staash,代码行数:5,代码来源:AnnotatedAstyanaxConfiguration.java

示例5: duplicate

import com.netflix.astyanax.retry.RetryPolicy; //导入依赖的package包/类
public RetryPolicy duplicate() {
	return new BoundedExponentialBackoffLog(keyspacename, baseSleepTimeMs, maxSleepTimeMs, max);
}
 
开发者ID:hdsdi3g,项目名称:MyDMAM,代码行数:4,代码来源:BoundedExponentialBackoffLog.java


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