All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neo4j.kernel.info.DiagnosticsProvider Maven / Gradle / Ivy

Go to download

Neo4j kernel is a lightweight, embedded Java database designed to store data structured as graphs rather than tables. For more information, see http://neo4j.org.

There is a newer version: 5.26.0
Show newest version
/*
 * Copyright (c) 2002-2015 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.kernel.info;

import org.neo4j.kernel.impl.util.StringLogger;

public interface DiagnosticsProvider
{
    /**
     * Return an identifier for this {@link DiagnosticsProvider}. The result of
     * this method must be stable, i.e. invoking this method multiple times on
     * the same object should return {@link Object#equals(Object) equal}
     * {@link String strings}.
     * 
     * For {@link DiagnosticsProvider}s where there is only one instance of that
     * {@link DiagnosticsProvider}, an implementation like this is would be a
     * sane default, given that the implementing class has a sensible name:
     * 
     * 
     * public String getDiagnosticsIdentifier()
     * {
     *     return getClass().getName();
     * }
     * 
* * @return the identifier of this diagnostics provider. */ String getDiagnosticsIdentifier(); /** * Accept a visitor that may or may not be capable of visiting this object. * * Typical example: * *
     * class OperationalStatistics implements {@link DiagnosticsProvider}
     * {
     *     public void {@link #acceptDiagnosticsVisitor(Object) acceptDiagnosticsVisitor}( {@link Object} visitor )
     *     {
     *         if ( visitor instanceof OperationalStatisticsVisitor )
     *         {
     *              ((OperationalStatisticsVisitor)visitor).visitOperationalStatistics( this );
     *         }
     *     }
     * }
     * 
     * interface OperationalStatisticsVisitor
     * {
     *     void visitOperationalStatistics( OperationalStatistics statistics );
     * }
     * 
* * @param visitor the visitor visiting this {@link DiagnosticsProvider}. */ void acceptDiagnosticsVisitor( Object visitor ); /** * Dump the diagnostic information of this {@link DiagnosticsProvider} for * the specified {@link DiagnosticsPhase phase} to the provided * {@link StringLogger log}. * * @param phase the {@link DiagnosticsPhase phase} to dump information for. * @param log the {@link StringLogger log} to dump information to. */ void dump( DiagnosticsPhase phase, StringLogger log ); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy