cdc.perfs.MeasureStatus Maven / Gradle / Ivy
package cdc.perfs;
import cdc.util.encoding.Encoded;
import cdc.util.encoding.Encoder;
import cdc.util.encoding.Encoders;
/**
* Enumeration of possible measure statuses.
*
* @author Damien Carbonne
*/
public enum MeasureStatus implements Encoded {
/**
* The measure has been started by the associated probe and is still
* running.
*/
RUNNING('R'),
/**
* The measure has been normally ended by the associated probe and wont
* evolve anymore.
*/
FROZEN('F'),
/**
* The measure has been closed because of an error:
*
* - Another higher level measure was ended before the associated one
* is ended.
* - The associated probe was started and it was already running.
* - The associated probe was ended and it was not running.
* This indicates that the associated probe forgot to end its measure.
*
*
*/
FROZEN_ON_ERROR('E');
private final Character code;
private MeasureStatus(char code) {
this.code = code;
}
public static final Encoder ENCODER = Encoders.encoder(MeasureStatus.class, Character.class);
@Override
public Character getCode() {
return code;
}
/**
* @return True if this status is frozen (FROZEN or FROZEN_ON_ERROR).
*/
public boolean isFrozen() {
return this != RUNNING;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy