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


Java ReplicationRequest类代码示例

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


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

示例1: setRandomTimeout

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
private static void setRandomTimeout(ReplicationRequest<?> request, Map<String, String> expectedParams) {
    if (randomBoolean()) {
        String timeout = randomTimeValue();
        request.timeout(timeout);
        expectedParams.put("timeout", timeout);
    } else {
        expectedParams.put("timeout", ReplicationRequest.DEFAULT_TIMEOUT.getStringRep());
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:RequestTests.java

示例2: onRetry

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
@Override
public void onRetry() {
    for (BulkItemRequest item : items) {
        if (item.request() instanceof ReplicationRequest) {
            // all replication requests need to be notified here as well to ie. make sure that internal optimizations are
            // disabled see IndexRequest#canHaveDuplicates()
            ((ReplicationRequest) item.request()).onRetry();
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:BulkShardRequest.java

示例3: TransportShardRefreshAction

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
@Inject
public TransportShardRefreshAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                   IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction,
                                   MappingUpdatedAction mappingUpdatedAction, ActionFilters actionFilters,
                                   IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, NAME, transportService, clusterService, indicesService, threadPool, shardStateAction, mappingUpdatedAction,
            actionFilters, indexNameExpressionResolver, ReplicationRequest.class, ReplicationRequest.class, ThreadPool.Names.REFRESH);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:TransportShardRefreshAction.java

示例4: shardOperationOnPrimary

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
@Override
protected Tuple<ActionWriteResponse, ReplicationRequest> shardOperationOnPrimary(MetaData metaData, ReplicationRequest shardRequest) throws Throwable {
    IndexShard indexShard = indicesService.indexServiceSafe(shardRequest.shardId().getIndex()).shardSafe(shardRequest.shardId().id());
    indexShard.refresh("api");
    logger.trace("{} refresh request executed on primary", indexShard.shardId());
    return new Tuple<>(new ActionWriteResponse(), shardRequest);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:TransportShardRefreshAction.java

示例5: shardOperationOnReplica

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
@Override
protected void shardOperationOnReplica(ReplicationRequest request) {
    IndexShard indexShard = indicesService.indexServiceSafe(request.shardId().getIndex()).shardSafe(request.shardId().id());
    indexShard.refresh("api");
    logger.trace("{} refresh request executed on replica", indexShard.shardId());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:TransportShardRefreshAction.java

示例6: newShardRequest

import org.elasticsearch.action.support.replication.ReplicationRequest; //导入依赖的package包/类
@Override
protected ReplicationRequest newShardRequest(RefreshRequest request, ShardId shardId) {
    return new ReplicationRequest(request, shardId);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:TransportRefreshAction.java


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