final void cmdRemoveExpiring ( final long lockId , final PersistentTransaction transaction ) throws ProtocolException , TransactionException , SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "cmdRemoveExpiring" , new Object [ ] { "Item Link: " + this , "Stream Link: " + _owningStreamLink , formatLockId ( lockId ) , "Transaction: " + transaction } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "expiring item " + _tuple . getUniqueId ( ) ) ; synchronized ( this ) { if ( ItemLinkState . STATE_LOCKED_FOR_EXPIRY == _itemLinkState ) { if ( _lockID != lockId ) { throw new LockIdMismatch ( _lockID , lockId ) ; } ListStatistics stats = getParentStatistics ( ) ; synchronized ( stats ) { stats . decrementExpiring ( ) ; stats . incrementRemoving ( ) ; } _transactionId = transaction . getPersistentTranId ( ) ; _itemLinkState = ItemLinkState . STATE_REMOVING_EXPIRING ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Invalid Item state: " + _itemLinkState ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "cmdRemoveExpiring" ) ; throw new StateException ( _itemLinkState . toString ( ) ) ; } } final Task task = new RemoveLockedTask ( this ) ; transaction . addWork ( task ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "cmdRemoveExpiring" ) ; }
Remove while locked for expiry