@Override public void afterIndexShardStarted(IndexShard indexShard) { for (IndexEventListener listener : listeners) { try { listener.afterIndexShardStarted(indexShard); } catch (Exception e) { logger.warn(() -> new ParameterizedMessage("[{}] failed to invoke after shard started callback", indexShard.shardId().getId()), e); throw e; } } }
@Override public void afterIndexShardStarted(IndexShard indexShard) { delegate.afterIndexShardStarted(indexShard); }
@Override public void afterIndexShardStarted(IndexShard indexShard) { for (IndexEventListener listener : listeners) { try { listener.afterIndexShardStarted(indexShard); } catch (Exception e) { logger.warn(() -> new ParameterizedMessage("[{}] failed to invoke after shard started callback", indexShard.shardId().getId()), e); throw e; } } }
@Override public void afterIndexShardStarted(IndexShard indexShard) { for (IndexEventListener listener : listeners) { try { listener.afterIndexShardStarted(indexShard); } catch (Exception e) { logger.warn((Supplier<?>) () -> new ParameterizedMessage("[{}] failed to invoke after shard started callback", indexShard.shardId().getId()), e); throw e; } } }
@Override public void afterIndexShardStarted(IndexShard indexShard) { for (IndexEventListener listener : listeners) { try { listener.afterIndexShardStarted(indexShard); } catch (Exception e) { logger.warn(() -> new ParameterizedMessage("[{}] failed to invoke after shard started callback", indexShard.shardId().getId()), e); throw e; } } }
indexEventListener.afterIndexShardStarted(this);
public synchronized void moveToStart() { synchronized(mutex) { if (state == IndexShardState.CREATED || state == IndexShardState.POST_RECOVERY) { // we want to refresh *before* we move to internal STARTED state try { getEngine().refresh("cluster_state_started"); } catch (Throwable t) { logger.warn("failed to refresh due to move to cluster wide started", t); } /* ShardRouting(ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state, RecoverySource recoverySource, UnassignedInfo unassignedInfo, AllocationId allocationId, long expectedShardSize, Collection<Range<Token>> tokenRanges) */ this.shardRouting = new ShardRouting(this.shardId, this.clusterService.localNode().getId(), null, true, ShardRoutingState.STARTED, null, IndexRoutingTable.UNASSIGNED_INFO_INDEX_CREATED, ShardRouting.DUMMY_ALLOCATION_ID, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE, AbstractSearchStrategy.EMPTY_RANGE_TOKEN_LIST); changeState(IndexShardState.STARTED, "start shard [" + state + "]"); indexEventListener.afterIndexShardStarted(this); } } }
indexEventListener.afterIndexShardStarted(this);
indexEventListener.afterIndexShardStarted(this);
indexEventListener.afterIndexShardStarted(this);