From 0f259838d108e691aa6a8e1bb45b9b7047a6612f Mon Sep 17 00:00:00 2001 From: Hoang Thuan Pham Date: Mon, 18 Sep 2023 10:32:34 -0400 Subject: [PATCH] linux.core: Add interface for segments that have a priority property This commit adds the IPrioritySegment interface. The interface is to be implemented by segments that have a priority to provide. [Added] Interface for segments that have priority. Change-Id: I27bf6482667a90d0209448f26fecea26ae3c1491 Signed-off-by: Hoang Thuan Pham Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204378 Tested-by: Trace Compass Bot Tested-by: Matthew Khouzam Reviewed-by: Patrick Tasse Reviewed-by: Matthew Khouzam --- .../core/segmentstore/IPrioritySegment.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/segmentstore/IPrioritySegment.java diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/segmentstore/IPrioritySegment.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/segmentstore/IPrioritySegment.java new file mode 100644 index 0000000000..1c7046230b --- /dev/null +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/segmentstore/IPrioritySegment.java @@ -0,0 +1,32 @@ +/******************************************************************************* +* Copyright (c) 2023 Ericsson +* +* All rights reserved. This program and the accompanying materials are made +* available under the terms of the Eclipse Public License 2.0 which +* accompanies this distribution, and is available at +* https://www.eclipse.org/legal/epl-2.0/ +* +* SPDX-License-Identifier: EPL-2.0 +*******************************************************************************/ + +package org.eclipse.tracecompass.internal.analysis.os.linux.core.segmentstore; + +import org.eclipse.tracecompass.segmentstore.core.ISegment; + +/** + * Interface to be implemented by segments that have a priority to provide. This + * priority can be used in analyses and outputs to identify segments. + * + * This interface is a qualifier interface for segments. A concrete segment type + * can implement many such qualifier interfaces. + * + * @author Hoang Thuan Pham + */ +public interface IPrioritySegment extends ISegment { + /** + * Get the priority of this segment + * + * @return The priority of this segment + */ + int getPriority(); +}