public final AbstractItem removeIfMatches ( final Filter filter , PersistentTransaction transaction ) throws ProtocolException , TransactionException , SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeIfMatches" , new Object [ ] { filter , transaction } ) ; AbstractItem foundItem = cmdRemoveIfMatches ( filter , transaction ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeIfMatches" , foundItem ) ; return foundItem ; }
remove the item if it matches and is available