public IndexerDefinitionBuilder fromJson(ObjectNode node, IndexerDefinitionBuilder indexerDefinitionBuilder) { String name = JsonUtil.getString(node, "name"); LifecycleState lifecycleState = LifecycleState.valueOf(JsonUtil.getString(node, "lifecycleState")); IncrementalIndexingState incrementalIndexingState = IncrementalIndexingState.valueOf(JsonUtil.getString(node, "incrementalIndexingState"));
public IndexerDefinitionBuilder fromJson(ObjectNode node, IndexerDefinitionBuilder indexerDefinitionBuilder) { String name = JsonUtil.getString(node, "name"); LifecycleState lifecycleState = LifecycleState.valueOf(JsonUtil.getString(node, "lifecycleState")); IncrementalIndexingState incrementalIndexingState = IncrementalIndexingState.valueOf(JsonUtil.getString(node, "incrementalIndexingState"));
node.put("lifecycleState", indexer.getLifecycleState().toString()); node.put("batchIndexingState", indexer.getBatchIndexingState().toString()); node.put("incrementalIndexingState", indexer.getIncrementalIndexingState().toString());
node.put("lifecycleState", indexer.getLifecycleState().toString()); node.put("batchIndexingState", indexer.getBatchIndexingState().toString()); node.put("incrementalIndexingState", indexer.getIncrementalIndexingState().toString());
IndexerDefinition.LifecycleState.valueOf(json.get("lifecycleState").getTextValue()) : null;
IndexerDefinition.LifecycleState.valueOf(json.get("lifecycleState").getTextValue()) : null;
private boolean shouldRunIndexer(IndexerDefinition indexerDef) { return indexerDef.getIncrementalIndexingState() == IncrementalIndexingState.SUBSCRIBE_AND_CONSUME && indexerDef.getSubscriptionId() != null && !indexerDef.getLifecycleState().isDeleteState(); }
private boolean needsBatchBuildStart(IndexerDefinition indexer) { return !indexer.getLifecycleState().isDeleteState() && indexer.getBatchIndexingState() == BatchIndexingState.BUILD_REQUESTED && indexer.getActiveBatchBuildInfo() == null; }
private boolean needsSubscriptionIdAssigned(IndexerDefinition indexer) { return !indexer.getLifecycleState().isDeleteState() && indexer.getIncrementalIndexingState() != IncrementalIndexingState.DO_NOT_SUBSCRIBE && indexer.getSubscriptionId() == null; }
private boolean needsBatchBuildStart(IndexerDefinition indexer) { return !indexer.getLifecycleState().isDeleteState() && indexer.getBatchIndexingState() == BatchIndexingState.BUILD_REQUESTED && indexer.getActiveBatchBuildInfo() == null; }
private boolean needsSubscriptionIdAssigned(IndexerDefinition indexer) { return !indexer.getLifecycleState().isDeleteState() && indexer.getIncrementalIndexingState() != IncrementalIndexingState.DO_NOT_SUBSCRIBE && indexer.getSubscriptionId() == null; }
private boolean shouldRunIndexer(IndexerDefinition indexerDef) { return indexerDef.getIncrementalIndexingState() == IncrementalIndexingState.SUBSCRIBE_AND_CONSUME && indexerDef.getSubscriptionId() != null && !indexerDef.getLifecycleState().isDeleteState(); }