Package org.graylog2.outputs.filter
Record Class DefaultFilteredMessage
java.lang.Object
java.lang.Record
org.graylog2.outputs.filter.DefaultFilteredMessage
- All Implemented Interfaces:
FilteredMessage
public record DefaultFilteredMessage(ImmutableMessage message, com.google.common.collect.Multimap<String,Stream> destinations)
extends Record
implements FilteredMessage
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFilteredMessage(ImmutableMessage message, com.google.common.collect.Multimap<String, Stream> destinations) Creates an instance of aDefaultFilteredMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestinationsrecord component.final booleanIndicates whether some other object is "equal to" this one.static DefaultFilteredMessageforDestinationKeys(Message message, Set<String> destinationKeys) Creates a filtered message for the given destination keys.final inthashCode()Returns a hash code value for this object.booleanWhether the message has been indexed or not.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultFilteredMessage
public DefaultFilteredMessage(ImmutableMessage message, com.google.common.collect.Multimap<String, Stream> destinations) Creates an instance of aDefaultFilteredMessagerecord class.- Parameters:
message- the value for themessagerecord componentdestinations- the value for thedestinationsrecord component
-
-
Method Details
-
forDestinationKeys
public static DefaultFilteredMessage forDestinationKeys(Message message, Set<String> destinationKeys) Creates a filtered message for the given destination keys. The streams of the given message are added to all destination keys.- Parameters:
message- the messagedestinationKeys- the set of destination keys- Returns:
- the new filtered message
-
isIndexed
public boolean isIndexed()Description copied from interface:FilteredMessageWhether the message has been indexed or not.- Specified by:
isIndexedin interfaceFilteredMessage- Returns:
- true if the message has been indexed. Otherwise, false.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceFilteredMessage- Returns:
- the value of the
messagerecord component
-
destinations
Returns the value of thedestinationsrecord component.- Specified by:
destinationsin interfaceFilteredMessage- Returns:
- the value of the
destinationsrecord component
-