當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。