[ 
https://issues.apache.org/jira/browse/MINIFI-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15592085#comment-15592085
 ] 

ASF GitHub Bot commented on MINIFI-39:
--------------------------------------

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


> Create Interface and Implementations for Bootstrap Status Reporters
> -------------------------------------------------------------------
>
>                 Key: MINIFI-39
>                 URL: https://issues.apache.org/jira/browse/MINIFI-39
>             Project: Apache NiFi MiNiFi
>          Issue Type: Sub-task
>            Reporter: Joseph Percivall
>            Assignee: Joseph Percivall
>             Fix For: 0.1.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to