Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/46#discussion_r84304728
  
    --- Diff: 
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/status/PeriodicStatusReporter.java
 ---
    @@ -0,0 +1,81 @@
    +/*
    + * 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.minifi.bootstrap.status;
    +
    +import org.apache.nifi.minifi.bootstrap.QueryableStatusAggregator;
    +
    +import java.util.Properties;
    +import java.util.concurrent.ScheduledThreadPoolExecutor;
    +import java.util.concurrent.TimeUnit;
    +
    +public abstract class PeriodicStatusReporter {
    +
    +    private final ScheduledThreadPoolExecutor scheduledExecutorService = 
new ScheduledThreadPoolExecutor(1);
    +
    +    private volatile int period = -1;
    +    private volatile int termination_wait = 5000;
    +
    +    public volatile Runnable reportRunner;
    +
    +    /**
    +     * Provides an opportunity for the implementation to perform 
configuration and initialization based on properties received from the 
bootstrapping configuration.
    +     *
    +     * @param properties from the bootstrap configuration
    +     */
    +    public abstract void initialize(Properties properties, 
QueryableStatusAggregator queryableStatusAggregator);
    +
    +    /**
    +     * Begins the associated reporting service provided by the given 
implementation.  In most implementations, no action will occur until this 
method is invoked. The implementing class must have set
    +     * 'reportRunner' prior to this method being called.
    +     *
    +     */
    +    public void start() {
    +        if (reportRunner == null){
    +            throw new IllegalStateException("Programmatic error, the 
reportRunner has is still NULL when 'start' was called.");
    --- End diff --
    
    minor:  has is -> is


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to