Package com.alibaba.cloud.ai.graph.agent
Interface Prioritized
- All Known Subinterfaces:
Hook
- All Known Implementing Classes:
AgentHook,HumanInTheLoopHook,InstructionAgentHook,InterruptionHook,MessagesAgentHook,MessagesModelHook,ModelCallLimitHook,ModelHook,PIIDetectionHook,ReturnDirectModelHook,ShellToolAgentHook,SkillsAgentHook,SummarizationHook,ToolCallLimitHook
public interface Prioritized
Interface for objects that can be prioritized and sorted by their order value.
Classes implementing this interface can be sorted based on their order value. Objects with smaller order values will be placed before objects with larger order values (ascending order). This is commonly used for hooks and other components that need to execute in a specific sequence.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
-
Field Details
-
HIGHEST_PRECEDENCE
static final int HIGHEST_PRECEDENCE- See Also:
-
LOWEST_PRECEDENCE
static final int LOWEST_PRECEDENCE- See Also:
-
-
Method Details
-
getOrder
int getOrder()Returns the order value for this object.The order value determines the priority of this object when sorted with other
Prioritizedobjects. Objects with smaller order values will be sorted before objects with larger order values (ascending order).For example:
- An object with order 1 will be placed before an object with order 5
- An object with order 10 will be placed before an object with order 20
- Returns:
- the order value (smaller values indicate higher priority)
-