#NEWLINE# def prune( self ) : #NEWLINE# #INDENT# "\n        Delete expired elements from the lookup table.\n\n        Keys whose Unix timestamps are older than `const.EPOCH_GRANULARITY' are\n        being removed from the lookup table.\n        " #NEWLINE# log . debug ( 'Pruning the replay table.' ) #NEWLINE# deleteList = [ ] #NEWLINE# now = int ( time . time ( ) ) #NEWLINE# for element in self . table . iterkeys ( ) : #NEWLINE# #INDENT# if ( ( now - self . table [ element ] ) > const . EPOCH_GRANULARITY ) : #NEWLINE# #INDENT# deleteList . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# for elem in deleteList : #NEWLINE# #INDENT# log . debug ( 'Deleting expired element.' ) #NEWLINE# del self . table [ elem ]