Skip to content

Package: MetricPredicate

MetricPredicate

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.datastore.model.query.predicate;
14:
15: import org.eclipse.kapua.service.storable.model.query.predicate.RangePredicate;
16:
17: /**
18: * Query predicate for matching range values on message metrics implementation
19: *
20: * @since 1.0.0
21: */
22: public interface MetricPredicate extends RangePredicate {
23:
24: /**
25: * The metric name.
26: *
27: * @return The metric name
28: * @since 1.3.0
29: */
30: String getName();
31:
32: /**
33: * Sets the metric name
34: *
35: * @param name The metric name
36: * @since 1.3.0
37: */
38: void setName(String name);
39:
40: /**
41: * Gets the metric type to search.
42: * This is required because metric with the same name can have different types.
43: *
44: * @return The metric type
45: * @since 1.0.0
46: */
47: Class<?> getType();
48:
49: /**
50: * Sets the metric type so search.
51: *
52: * @param type The metric type to search.
53: * @since 1.0.0
54: */
55: void setType(Class<?> type);
56:
57: }