#NEWLINE# def __init__( self , * args ) : #NEWLINE# #INDENT# super ( CardinalityRule , self ) . __init__ ( * args ) #NEWLINE# if ( ( 'max_cardinality' not in self . rules ) and ( 'min_cardinality' not in self . rules ) ) : #NEWLINE# #INDENT# raise EAException ( 'CardinalityRule must have one of either max_cardinality or min_cardinality' ) #NEWLINE# #UNINDENT# self . ts_field = self . rules . get ( 'timestamp_field' , '@timestamp' ) #NEWLINE# self . cardinality_field = self . rules [ 'cardinality_field' ] #NEWLINE# self . cardinality_cache = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . first_event = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . timeframe = self . rules [ 'timeframe' ]