Notification that this message has been locked.
559278
public void eventLocked()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "eventLocked");

    // modify prefetching info
    synchronized (this)
    {
      RemoteDispatchableKey dkey = key.getRemoteDispatchableKey();
      RemoteQPConsumerKey ck = null;
      if (dkey instanceof RemoteQPConsumerKey)
        ck = (RemoteQPConsumerKey) dkey;

      if (ck != null)
      {
        ck.messageLocked(key);
        informedConsumerKeyThatLocked = true;
      }
    }

    // call superclass
    super.eventLocked();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "eventLocked");
  }
51522
public synchronized void unlock()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "unlock", this);

    // If the subscription locks are down to zero then notify the threads waiting
    // for the subscriptionTable lock.
    synchronized (iMutex)
    {
      if (readLockCount == 0)
      {
        if (tc.isEntryEnabled()) 
          SibTr.exit(tc, "unlock", "SIErrorException");
        
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
          new Object[] {
            "com.ibm.ws.sib.processor.utils.AdvancedLockManager",
            "1:237:1.3" });
          
        throw new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.utils.AdvancedLockManager",
              "1:244:1.3" },
            null));
      }
      
      decrementThreadLockCount();
      // Decrement the lock count and notify the other threads if no 
      // one holds the lock any more.
      if (readLockCount == 0)
        notifyAll();        
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "unlock");
  }
1238699
private void notifyGet_() {
        // a notification may be lost in some cases - however
        // as none of the threads wait endlessly, a waiting thread
        // will either be notified, or will eventually wakeup
        int lastWaitIndex = getQueueIndex(getQueueLocks_, getQueueCounter_, false);
        int lockIndex = lastWaitIndex;
        for (int i = 0; i < getQueueLocks_.length; i++) {

            // are threads waiting on this queue?
            if (getQueueLocks_[lockIndex].threadsWaiting > 0) {
                synchronized (getQueueLocks_[lockIndex]) {
                    // make sure we are actually notifying somebody
                    // now that the lock is held
                    if (getQueueLocks_[lockIndex].threadsWaiting > 0) {
                        getQueueLocks_[lockIndex].notify();
                        return;
                    } else {
                        // somebody stole my notify, make up for it
                        // by allowing another attempt
                        i--;
                    }
                }
            }

            // check to see whether a new thread has waited
            int checkIndex = getQueueIndex(getQueueLocks_, getQueueCounter_, false);
            if (checkIndex != lastWaitIndex) {
                // restart scan from the new wait index
                lockIndex = checkIndex;
                lastWaitIndex = lockIndex;
                i = 0;
            } else {
                // increment to next element
                lockIndex = ++lockIndex % getQueueLocks_.length;
            }
        }

        // D638088 - if we get here, the entire lock array was scanned and
        // nobody was found to notify.
    }
1046509
def notification_message(cls, item):
        ''''''
        assert isinstance(item, Notification)
        return cls.encode_payload(cls.request_payload(item, None))
712434
public final void messageUnlocked(AIStreamKey key)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(this, tc, "messageUnlocked", key);
    synchronized (this)
    {
      countOfUnlockedMessages++;
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "readAhead change: countOfUnlockedMessages++ " + countOfUnlockedMessages);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(this, tc, "messageUnlocked");
  }
841879
void tryUnlockCurrent() {

        if ((m_lockAction != null) && m_lockAction.getChange().equals(CmsLockActionRecord.LockChange.locked)) {
            try {
                A_CmsUI.getCmsObject().unlockResource(m_currentResource);
            } catch (CmsException e) {
                e.printStackTrace();
            }
        }
    }
732270
@Override
    public void notifyMessageReceived(SQSMessage message) throws JMSException {
        SQSMessageIdentifier messageIdentifier = SQSMessageIdentifier.fromSQSMessage(message);
        unAckMessages.put(message.getReceiptHandle(), messageIdentifier);
    }
1317482
public SIBusMessage nextLocked()
  throws SISessionUnavailableException, SISessionDroppedException,
         SIResourceException, SIConnectionLostException, 
         SIErrorException, SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "nextLocked", this);

    checkValidState("nextLocked");
          
    _localConsumerPoint.checkNotClosed();  

    if (_seenSingleMessage || _singleMessage == null)
    {
      _messageAvailable = false;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "nextLocked", null);
      return null;
    }
    _seenSingleMessage = true;
    
    JsMessage msg = null;
    
    // Because this message is not in the message store there is no need to copy it
    // before giving it to a caller unless this is pubsub, in which case there may be
    // other subscriptions referencing the same message, in which case we must copy the
    // message (unless the caller indicates that they won't be altering it)
    if(_isPubsub &&
       ((ConnectionImpl)(_localConsumerPoint.getConsumerSession().getConnection())).getMessageCopiedWhenReceived())
    {
      try
      {
        msg = (_singleMessage.getMessage()).getReceived();
      }
      catch (MessageCopyFailedException e)
      {
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.SingleLockedMessageEnumerationImpl.nextLocked",
          "1:172:1.44",
          this);
            
        SibTr.exception(tc, e);
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.SingleLockedMessageEnumerationImpl",
            "1:179:1.44",
            e });
          
        _seenSingleMessage = false;
        _messageAvailable = false;
  
        if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
          SibTr.exit(CoreSPILockedMessageEnumeration.tc, "nextLocked", e);
  
        throw new SIResourceException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] {
              "com.ibm.ws.sib.processor.impl.SingleLockedMessageEnumerationImpl",
              "1:193:1.44",
              e },
            null),
          e);
      }
    }
    else
      msg = _singleMessage.getMessage();
          
    //indicate that there is a messageAvailable
    _messageAvailable = true;

    if (TraceComponent.isAnyTracingEnabled() && UserTrace.tc_mt.isDebugEnabled())                                   
      UserTrace.trace_Receive(null, 
                              msg, 
                              _localConsumerPoint.getConsumerSession().getDestinationAddress(), 
                              _localConsumerPoint.getConsumerSession().getIdInternal());
    
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
          SibTr.exit(CoreSPILockedMessageEnumeration.tc, "nextLocked", msg);
    
    return msg;
  }
1113387
def notify(message, message_opts = {})
      if _client?
        return unless enabled?
      else
        return unless active?
      end

      @detected.available.each do |notifier|
        notifier.notify(message, message_opts.dup)
      end
    end
601220
public void unlockCurrent()
  throws SISessionUnavailableException, SISessionDroppedException,
         SIIncorrectCallException,
         SIErrorException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "unlockCurrent", this);
      
    deleteCurrent(null);
    
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.exit(CoreSPILockedMessageEnumeration.tc, "unlockCurrent");
  }
109698
public synchronized void unlock()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "unlock", this);

    // If the subscription locks are down to zero then notify the threads waiting
    // for the subscriptionTable lock.
    synchronized (iMutex)
    {
      // If we are exclusively locked, then just return, as long as
      // the thread that is calling is the thread that holds the
      // exclusive lock.
      if (iExclusivelyLocked && iExclusiveLockHolder == Thread.currentThread())
      {
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "unlock");
        return;
      }

      // Decrement the lock count and notify the other threads if no 
      // one holds the lock any more.
      if (--iLockCount == 0)
        notifyAll();
        
      if (iLockCount < 0)
      {      
        if (tc.isEntryEnabled()) 
          SibTr.exit(tc, "unlock", "SIErrorException");
        
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
          new Object[] {
            "com.ibm.ws.sib.processor.utils.LockManager",
            "1:196:1.19" });
          
        throw new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.utils.LockManager",
              "1:203:1.19" },
            null));
      }        
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "unlock");
  }
1112524
public void onMemberUnblocked(AVIMClient client, AVIMConversation conversation, List<String> members, String operator){
    LOGGER.d("Notification --- " + operator + " unblocked members: " + StringUtil.join(", ", members));
  }
15210
def _message_received(self, message):
        """"""
        with self.lock:
            self._state.receive_message(message)
            for callable in chain(self._on_message_received, self._on_message):
                callable(message)
1135928
String waitAndGetMessage() {
    synchronized (this) {
      // Wait for a message to send.
      while (this.statusMessagesToSend.isEmpty()) {
        try {
          this.wait();
        } catch (final InterruptedException e) {
          LOG.log(Level.FINE, "Interrupted. Ignoring.");
        }
      }

      // Send the message
      return getMessageForStatus(this.statusMessagesToSend.poll());
    }
  }
149719
public final void messageLocked(AIStreamKey key)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(this, tc, "messageLocked", key);
    synchronized (this)
    {
      countOfUnlockedMessages--;
            
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "readAhead change: countOfUnlockedMessages-- " + countOfUnlockedMessages);
    }
    try
    {
      if (readAhead)
        tryPrefetching();
    }
    catch (SIResourceException e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.messageLocked",
        "1:663:1.47.1.26",
        this);
      SibTr.exception(tc, e);
      // no need to throw this exception, since its only a failure in prefetching
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(this, tc, "messageLocked");
  }
373684
async def _handle_bad_notification(self, message):
        
        bad_msg = message.obj
        states = self._pop_states(bad_msg.bad_msg_id)

        self._log.debug('Handling bad msg %s', bad_msg)
        if bad_msg.error_code in (16, 17):
            # Sent msg_id too low or too high (respectively).
            # Use the current msg_id to determine the right time offset.
            to = self._state.update_time_offset(
                correct_msg_id=message.msg_id)
            self._log.info('System clock is wrong, set time offset to %ds', to)
        elif bad_msg.error_code == 32:
            # msg_seqno too low, so just pump it up by some "large" amount
            # TODO A better fix would be to start with a new fresh session ID
            self._state._sequence += 64
        elif bad_msg.error_code == 33:
            # msg_seqno too high never seems to happen but just in case
            self._state._sequence -= 16
        else:
            for state in states:
                state.future.set_exception(
                    BadMessageError(state.request, bad_msg.error_code))
            return

        # Messages are to be re-sent once we've corrected the issue
        self._send_queue.extend(states)
        self._log.debug('%d messages will be resent due to bad msg',
                        len(states))
1043866
def message_received(self, message):
        """"""
        # If the message identifer is outstanding, then someone is
        # waiting for the respone so we save it here
        identifier = message.identifier or 'type_' + str(message.type)
        if identifier in self._outstanding:
            outstanding = OutstandingMessage(
                self._outstanding[identifier].semaphore, message)
            self._outstanding[identifier] = outstanding
            self._outstanding[identifier].semaphore.release()
        else:
            asyncio.ensure_future(self._dispatch(message), loop=self.loop)