NIFIREG-247 Adding ScheduleState enum and adding field to processor, port, and remote port
This closes #165. Signed-off-by: Kevin Doran <kdoran@apache.org>
This commit is contained in:
Родитель
563bfeda97
Коммит
351849055e
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.nifi.registry.flow;
|
||||
|
||||
public enum ScheduledState {
|
||||
ENABLED,
|
||||
DISABLED;
|
||||
}
|
|
@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
public class VersionedPort extends VersionedComponent {
|
||||
private PortType type;
|
||||
private Integer concurrentlySchedulableTaskCount;
|
||||
private ScheduledState scheduledState;
|
||||
|
||||
@ApiModelProperty("The number of tasks that should be concurrently scheduled for the port.")
|
||||
public Integer getConcurrentlySchedulableTaskCount() {
|
||||
|
@ -41,6 +42,15 @@ public class VersionedPort extends VersionedComponent {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
@ApiModelProperty("The scheduled state of the component")
|
||||
public ScheduledState getScheduledState() {
|
||||
return scheduledState;
|
||||
}
|
||||
|
||||
public void setScheduledState(ScheduledState scheduledState) {
|
||||
this.scheduledState = scheduledState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ComponentType getComponentType() {
|
||||
if (type == PortType.OUTPUT_PORT) {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
package org.apache.nifi.registry.flow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class VersionedProcessor extends VersionedComponent
|
||||
implements VersionedConfigurableComponent, VersionedExtensionComponent {
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class VersionedProcessor extends VersionedComponent
|
|||
private Long runDurationMillis;
|
||||
private Integer concurrentlySchedulableTaskCount;
|
||||
private Set<String> autoTerminatedRelationships;
|
||||
|
||||
private ScheduledState scheduledState;
|
||||
|
||||
@ApiModelProperty("The frequency with which to schedule the processor. The format of the value will depend on th value of schedulingStrategy.")
|
||||
public String getSchedulingPeriod() {
|
||||
|
@ -190,8 +190,18 @@ public class VersionedProcessor extends VersionedComponent
|
|||
this.style = style;
|
||||
}
|
||||
|
||||
@ApiModelProperty("The scheduled state of the component")
|
||||
public ScheduledState getScheduledState() {
|
||||
return scheduledState;
|
||||
}
|
||||
|
||||
public void setScheduledState(ScheduledState scheduledState) {
|
||||
this.scheduledState = scheduledState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ComponentType getComponentType() {
|
||||
return ComponentType.PROCESSOR;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package org.apache.nifi.registry.flow;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class VersionedRemoteGroupPort extends VersionedComponent {
|
||||
private String remoteGroupId;
|
||||
private Integer concurrentlySchedulableTaskCount;
|
||||
|
@ -28,6 +28,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
|
|||
private BatchSize batchSize;
|
||||
private ComponentType componentType;
|
||||
private String targetId;
|
||||
private ScheduledState scheduledState;
|
||||
|
||||
@ApiModelProperty("The number of task that may transmit flowfiles to the target port concurrently.")
|
||||
public Integer getConcurrentlySchedulableTaskCount() {
|
||||
|
@ -75,6 +76,15 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
|
|||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
@ApiModelProperty("The scheduled state of the component")
|
||||
public ScheduledState getScheduledState() {
|
||||
return scheduledState;
|
||||
}
|
||||
|
||||
public void setScheduledState(ScheduledState scheduledState) {
|
||||
this.scheduledState = scheduledState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 923847 + String.valueOf(getName()).hashCode();
|
||||
|
|
Загрузка…
Ссылка в новой задаче