Record Class PrioritizedFilter
java.lang.Object
java.lang.Record
org.apache.camel.component.dynamicrouter.filter.PrioritizedFilter
- Record Components:
id- The identifier for this prioritized filter.priority- The priority value of this processor.predicate- the rule expressionendpoint- the destination endpoint for matching exchangesstatistics- the object that holds routing statistics for this filter
- All Implemented Interfaces:
Comparable<PrioritizedFilter>
public record PrioritizedFilter(String id, int priority, org.apache.camel.Predicate predicate, String endpoint, PrioritizedFilterStatistics statistics)
extends Record
implements Comparable<PrioritizedFilter>
This class serves as a wrapper around a
FilterProcessor to include an integer representing the priority of
this processor, and a Comparator to sort by priority, then by id.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPrioritizedFilter(String id, int priority, org.apache.camel.Predicate predicate, String endpoint, PrioritizedFilterStatistics statistics) Creates an instance of aPrioritizedFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PrioritizedFilter other) Compare the priority of this instance to the priority of the parameter.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.org.apache.camel.PredicateReturns the value of thepredicaterecord component.intpriority()Returns the value of thepriorityrecord component.Returns the value of thestatisticsrecord component.toString()Create a string representation of this processor.
-
Constructor Details
-
PrioritizedFilter
public PrioritizedFilter(String id, int priority, org.apache.camel.Predicate predicate, String endpoint, PrioritizedFilterStatistics statistics) Creates an instance of aPrioritizedFilterrecord class.- Parameters:
id- the value for theidrecord componentpriority- the value for thepriorityrecord componentpredicate- the value for thepredicaterecord componentendpoint- the value for theendpointrecord componentstatistics- the value for thestatisticsrecord component
-
-
Method Details
-
compareTo
Compare the priority of this instance to the priority of the parameter.- Specified by:
compareToin interfaceComparable<PrioritizedFilter>- Parameters:
other- the processor to compare with- Returns:
- the result of the priority comparison
-
toString
Create a string representation of this processor. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
predicate
public org.apache.camel.Predicate predicate()Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
statistics
Returns the value of thestatisticsrecord component.- Returns:
- the value of the
statisticsrecord component
-