org.ow2.petals.probes.api.KeyedProbesFactory Maven / Gradle / Ivy
/**
* Copyright (c) 2012-2016 Linagora
*
* This program/library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or (at your
* option) any later version.
*
* This program/library 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 Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program/library; If not, see http://www.gnu.org/licenses/
* for the GNU Lesser General Public License version 2.1.
*/
package org.ow2.petals.probes.api;
import java.util.Timer;
import org.ow2.petals.probes.api.key.ProbeKey;
import org.ow2.petals.probes.api.probes.KeyedCounterProbe;
import org.ow2.petals.probes.api.probes.KeyedCounterProbeWithExecutionStatus;
import org.ow2.petals.probes.api.probes.KeyedGaugeProbe;
import org.ow2.petals.probes.api.probes.KeyedResponseTimeProbe;
import org.ow2.petals.probes.api.sensor.KeyedGaugeSensor;
import org.ow2.petals.probes.api.sensor.detector.KeyedCounterDefectDetector;
/**
* Keyed probe factory.
*
* @param
* Type of the key identifying each counter, implementing
* {@link ProbeKey}.
* @param
* The type of measured values (internal value type).
* @param
* The type of value to return to client probe (external value type).
*
* @author Christophe DENEUX (Linagora)
*/
public interface KeyedProbesFactory, S> {
/**
* Create a new keyed counter probe instance.
*
* @see {@link KeyedCounterProbe}
*/
public KeyedCounterProbe createKeyedCounterProbe();
/**
* Create a new keyed counter probe instance using a specific defect
* detector.
*
* @param defectDetector
* The defect detector
*
* @see {@link KeyedCounterProbe}
*/
public KeyedCounterProbe createKeyedCounterProbe(
final KeyedCounterDefectDetector defectDetector);
/**
* Create a new keyed counter probe instance with execution status.
*
* @see {@link KeyedCounterProbeWithExecutionStatus}
*/
public KeyedCounterProbeWithExecutionStatus createKeyedCounterProbeWithExecutionStatus();
/**
* Create a new keyed counter probe instance with execution status using a
* specific defect detector.
*
* @param defectDetector
* The defect detector
*
* @see {@link KeyedCounterProbeWithExecutionStatus}
*/
public KeyedCounterProbeWithExecutionStatus createKeyedCounterProbeWithExecutionStatus(
final KeyedCounterDefectDetector defectDetector);
/**
* Create a new keyed counter probe instance.
*
* @see {@link KeyedGaugeProbe}
*/
public KeyedGaugeProbe createKeyedGaugeProbe(final KeyedGaugeSensor sensor);
/**
* Create a new keyed response time probe instance.
*
* @param timer
* The {@link Timer} running the samples switches task
* @param samplePeriod
* Duration between two samples switches
* @throws IllegalArgumentException
* timer
is null
, or
* samplePeriod
has an invalid value.
* @see {@link KeyedGaugeProbe}
*/
public KeyedResponseTimeProbe createKeyedResponseTimeProbe(final Timer timer, final long samplePeriod);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy