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

tools.service.metadata.DefaultOperationMetadata Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
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;

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy