Interface CommandMessageFilter

All Superinterfaces:
Serializable
All Known Implementing Classes:
AcceptAll, AndCommandMessageFilter, CommandNameFilter, DenyAll, DenyCommandNameFilter, NegateCommandMessageFilter, OrCommandMessageFilter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CommandMessageFilter extends Serializable
Interface describing a filter that can be applied to commands to describe the type of commands supported by a node in a cluster.
Since:
4.0
Author:
Allard Buijze
  • Method Details

    • matches

      boolean matches(@Nonnull CommandMessage<?> commandMessage)
      Indicates whether the given commandMessage matches this filter.
      Parameters:
      commandMessage - the message to match
      Returns:
      true if the command matches, otherwise false
    • and

      default CommandMessageFilter and(@Nonnull CommandMessageFilter other)
      Returns a filter that matches when both this instance and the given other match.
      Parameters:
      other - the other filter to match against
      Returns:
      a filter that matches when both this instance and the other match
    • negate

      default CommandMessageFilter negate()
      Returns a filter that matches when this instance doesn't, and vice versa.
      Returns:
      a filter that negates the result of this instance
    • or

      default CommandMessageFilter or(@Nonnull CommandMessageFilter other)
      Returns a filter that matches when either this instance or the given other matches.
      Parameters:
      other - the other filter to match against
      Returns:
      a filter that matches when either this instance or the other matches