Package org.projectnessie.events.spi
Interface EventFilter
-
- All Superinterfaces:
java.util.function.Predicate<org.projectnessie.events.api.Event>
- 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 EventFilter extends java.util.function.Predicate<org.projectnessie.events.api.Event>A filter for events.Filters can be combined using
and(EventFilter...),or(EventFilter...)andnot(EventFilter).
-
-
Method Summary
Static Methods Modifier and Type Method Description static EventFilterall()Returns a filter that matches all events.static EventFilterand(EventFilter... filters)Returns a filter that matches all events that match all the given filters.static EventFiltercreatedAfter(java.time.Instant i)Returns a filter that matches all events created after the given instant.static EventFiltercreatedBefore(java.time.Instant i)Returns a filter that matches all events created before the given instant.static EventFilterhasProperty(java.lang.String key)Returns a filter that matches all events that have a property with the given key.static EventFilterhasProperty(java.lang.String key, java.lang.String value)Returns a filter that matches all events that have a property with the given key and value.static EventFilterinitiatedBy(java.lang.String username)Returns a filter that matches all events initiated by the given username.static EventFilternone()Returns a filter that matches no events.static EventFilternot(EventFilter filter)Returns a filter that matches all events that do not match the given filter.static EventFilteror(EventFilter... filters)Returns a filter that matches all events that match at least one of the given filters.static EventFilterrepositoryId(java.lang.String id)Returns a filter that matches all events that have the given repository id.
-
-
-
Method Detail
-
all
static EventFilter all()
Returns a filter that matches all events.
-
none
static EventFilter none()
Returns a filter that matches no events.
-
and
static EventFilter and(EventFilter... filters)
Returns a filter that matches all events that match all the given filters.
-
or
static EventFilter or(EventFilter... filters)
Returns a filter that matches all events that match at least one of the given filters.
-
not
static EventFilter not(EventFilter filter)
Returns a filter that matches all events that do not match the given filter.
-
repositoryId
static EventFilter repositoryId(java.lang.String id)
Returns a filter that matches all events that have the given repository id.
-
createdAfter
static EventFilter createdAfter(java.time.Instant i)
Returns a filter that matches all events created after the given instant.
-
createdBefore
static EventFilter createdBefore(java.time.Instant i)
Returns a filter that matches all events created before the given instant.
-
initiatedBy
static EventFilter initiatedBy(java.lang.String username)
Returns a filter that matches all events initiated by the given username.
-
hasProperty
static EventFilter hasProperty(java.lang.String key)
Returns a filter that matches all events that have a property with the given key.
-
hasProperty
static EventFilter hasProperty(java.lang.String key, java.lang.String value)
Returns a filter that matches all events that have a property with the given key and value.
-
-