Package cz.xtf.core.event
Class EventListFilter
- java.lang.Object
-
- cz.xtf.core.event.EventListFilter
-
public class EventListFilter extends Object
-
-
Constructor Summary
Constructors Constructor Description EventListFilter(EventList events)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventListFilterafter(ZonedDateTime date)Filter events that are last seen strictly after the date.booleanatLeastOneRegexMessages(String... messagesRegex)Return true if there is at least one event that match one of the given messages (reg.EventListcollect()Return filteredEventListlongcount()Stream<io.fabric8.kubernetes.api.model.Event>getStream()EventListFilterinOneOfTimeWindows(ZonedDateTime... dates)Filter events that are last seen in any if given time windows.EventListFilterofEventTypes(String... types)Filter events of types defined in the array (case insensitive).EventListFilterofMessages(String... messagesRegex)Filter events with messages (reg.EventListFilterofObjKinds(String... kinds)Filter events with involved object kind defined in the array (case insensitive).EventListFilterofObjNames(String... regexNames)Filter events with involved object name defined in the array of reg.EventListFilterofReasons(String... reasons)Filter events with involved object kind defined in the array (case insensitive).
-
-
-
Constructor Detail
-
EventListFilter
public EventListFilter(EventList events)
-
-
Method Detail
-
ofEventTypes
public EventListFilter ofEventTypes(String... types)
Filter events of types defined in the array (case insensitive). For example:Warning,Normal, ...
-
ofObjKinds
public EventListFilter ofObjKinds(String... kinds)
Filter events with involved object kind defined in the array (case insensitive). For example:Warning,Normal, ...
-
atLeastOneRegexMessages
public boolean atLeastOneRegexMessages(String... messagesRegex)
Return true if there is at least one event that match one of the given messages (reg. expressions)
-
ofMessages
public EventListFilter ofMessages(String... messagesRegex)
Filter events with messages (reg. expressions) defined in the array.
-
ofObjNames
public EventListFilter ofObjNames(String... regexNames)
Filter events with involved object name defined in the array of reg. expressions.
-
inOneOfTimeWindows
public EventListFilter inOneOfTimeWindows(ZonedDateTime... dates)
Filter events that are last seen in any if given time windows. A structure of the array should be: [from date], [until date], [from date] [until date],... Event needs to be seen strictly afterfrom dateand before or at the same time asuntil date.ZonedDateTimeis used because a OpenShift cluster is distributed and time is provided inDateTimeFormatter.ISO_DATE_TIMEformat that consider time zones. Therefore wee need to compare it againstZonedDateTime.now()(for example)- See Also:
ZonedDateTime
-
after
public EventListFilter after(ZonedDateTime date)
Filter events that are last seen strictly after the date.
-
getStream
public Stream<io.fabric8.kubernetes.api.model.Event> getStream()
-
ofReasons
public EventListFilter ofReasons(String... reasons)
Filter events with involved object kind defined in the array (case insensitive).
-
count
public long count()
-
-