public void init ( String txn , TransactionConfig btc ) { FilterProcessor fp = null ; if ( btc . getFilter ( ) != null ) { fp = new FilterProcessor ( txn , btc ) ; } synchronized ( filterMap ) { // Check if old filter processor needs to be removed FilterProcessor oldfp = filterMap . get ( txn ) ; if ( oldfp != null ) { globalExclusionFilters . remove ( oldfp ) ; btxnFilters . remove ( oldfp ) ; } if ( fp != null ) { // Add new filter processor filterMap . put ( txn , fp ) ; if ( fp . isIncludeAll ( ) ) { globalExclusionFilters . add ( fp ) ; } else { btxnFilters . add ( fp ) ; } } else { filterMap . remove ( txn ) ; } } }
This method initialises the filter manager with the supplied transaction configuration .