tools.service.metadata.DefaultOperationMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brunner-core-tools Show documentation
Show all versions of brunner-core-tools Show documentation
Tools module for the BRunner project
package tools.service.metadata;
import java.util.Objects;
/**
* Default implementation of {@link IOperationMetadata}. Ensures that both
* serializationKey and description are non-null.
*
* @param serializationKey the key used for serialization purposes
* @param description the description of the operation
*/
public record DefaultOperationMetadata(String serializationKey, String description, boolean recordOperationMeasure)
implements IOperationMetadata {
/**
* Validates that both serializationKey and description are not null.
*/
public DefaultOperationMetadata {
Objects.requireNonNull(serializationKey, "serializationKey must not be null");
Objects.requireNonNull(description, "description must not be null");
}
@Override
public IOperationMetadata getMetadata() {
return this;
}
}