Interface Filter

All Superinterfaces:
Transformer
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 Filter extends Transformer
View transformer which filters out entries which don't belong. Implementations only need to implement the isAllowed method.
See Also:
  • Method Details

    • isAllowed

      boolean isAllowed(byte[] key, byte[] value) throws IOException
      Return true if the given key and value are not to be filtered out.
      Throws:
      IOException
    • transformValue

      default byte[] transformValue(byte[] value, byte[] key, byte[] tkey) throws IOException
      Calls the isAllowed method.
      Specified by:
      transformValue in interface Transformer
      Parameters:
      value - nullable value to transform
      key - non-null untransformed key associated with the value
      tkey - non-null transformed key associated with the value
      Returns:
      transformed value or null to discard entry
      Throws:
      IOException
    • inverseTransformValue

      default byte[] inverseTransformValue(byte[] tvalue, byte[] key, byte[] tkey) throws IOException, ViewConstraintException
      Calls the isAllowed method.
      Specified by:
      inverseTransformValue in interface Transformer
      Parameters:
      tvalue - nullable value to transform
      key - non-null untransformed key associated with the value
      tkey - non-null transformed key associated with the value
      Returns:
      inverse transformed value, or null to delete the value
      Throws:
      ViewConstraintException - if inverse transformation of given value is not supported
      IOException