/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPDeliveryStreamSetReceiverControllable#getLastTickReceived()
191910
public long getLastTickReceived() throws SIMPControllableNotFoundException, SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getLastTickReceived");

    assertValidControllable();

    long tick = 0;
    Iterator itr = null;
    try
    {
      itr = streamSet.iterator();
    }
    catch (SIResourceException e)
    {
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.TargetStreamSetControl.getLastTickReceived",
          "1:194:1.16",
          this);
      
        SIMPRuntimeOperationFailedException finalE =
          new SIMPRuntimeOperationFailedException(
            nls.getFormattedMessage(
              "INTERNAL_MESSAGING_ERROR_CWSIP0002",
              new Object[] {"TargetStreamSetControl.getLastTickReceived",
                  "1:202:1.16",
                            e},
              null), e);
            
        SibTr.exception(tc, finalE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getLastTickReceived", finalE);
        throw finalE;
    }
    while(itr.hasNext())
    {
      TargetStream stream = (TargetStream) itr.next();
      long newTick = stream.getLastKnownTick();
      tick = (newTick > tick) ? newTick : tick;
    }   

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getLastTickReceived", new Long(tick));
      
    return tick;
  }
81530
public Object getCorrectedReceiver() {
        Object receiver = args[0];
        if (receiver==null) {
            if (LOG_ENABLED) LOG.info("receiver is null");
            receiver = NullObject.getNullObject();
        }
        return receiver;
    }
1214080
public void messageReceived(Object message) {
        if (message instanceof Packet) {
            try {
                messageReceived(conn, (Packet) message);
            } catch (Exception e) {
                log.warn("Exception on packet receive", e);
            }
        } else {
            // raw buffer handling
            IoBuffer in = (IoBuffer) message;
            // filter based on current connection state
            RTMP rtmp = conn.getState();
            final byte connectionState = conn.getStateCode();
            log.trace("connectionState: {}", RTMP.states[connectionState]);
            // get the handshake
            OutboundHandshake handshake = (OutboundHandshake) conn.getAttribute(RTMPConnection.RTMP_HANDSHAKE);
            switch (connectionState) {
                case RTMP.STATE_CONNECT:
                    log.debug("Handshake - client phase 1 - size: {}", in.remaining());
                    in.get(); // 0x01
                    byte handshakeType = in.get(); // usually 0x03 (rtmp)
                    log.debug("Handshake - byte type: {}", handshakeType);
                    // copy out 1536 bytes
                    byte[] s1 = new byte[Constants.HANDSHAKE_SIZE];
                    in.get(s1);
                    // decode s1
                    IoBuffer out = handshake.decodeServerResponse1(IoBuffer.wrap(s1));
                    if (out != null) {
                        // set state to indicate we're waiting for S2
                        rtmp.setState(RTMP.STATE_HANDSHAKE);
                        conn.writeRaw(out);
                        // if we got S0S1+S2 continue processing
                        if (in.remaining() >= Constants.HANDSHAKE_SIZE) {
                            log.debug("Handshake - client phase 2 - size: {}", in.remaining());
                            if (handshake.decodeServerResponse2(in)) {
//                                conn.removeAttribute(RTMPConnection.RTMP_HANDSHAKE);
//                                conn.setStateCode(RTMP.STATE_CONNECTED);
//                                connectionOpened(conn);
                            } else {
                                log.warn("Handshake failed on S2 processing");
                                //conn.close();
                            }
                            // open regardless of server type
                            conn.removeAttribute(RTMPConnection.RTMP_HANDSHAKE);
                            conn.setStateCode(RTMP.STATE_CONNECTED);
                            connectionOpened(conn);
                        }
                    } else {
                        log.warn("Handshake failed on S0S1 processing");
                        conn.close();
                    }
                    break;
                case RTMP.STATE_HANDSHAKE:
                    log.debug("Handshake - client phase 2 - size: {}", in.remaining());
                    if (handshake.decodeServerResponse2(in)) {
//                        conn.removeAttribute(RTMPConnection.RTMP_HANDSHAKE);
//                        conn.setStateCode(RTMP.STATE_CONNECTED);
//                        connectionOpened(conn);
                    } else {
                        log.warn("Handshake failed on S2 processing");
                        //conn.close();
                    }
                    // open regardless of server type
                    conn.removeAttribute(RTMPConnection.RTMP_HANDSHAKE);
                    conn.setStateCode(RTMP.STATE_CONNECTED);
                    connectionOpened(conn);
                    break;
                default:
                    throw new IllegalStateException("Invalid RTMP state: " + connectionState);
            }
        }
    }
1215401
public void connectedReceived() {
        if (null != listenerReference) {
            final Listener listener = listenerReference.get();
            if (null != listener) {
                new Handler(Looper.getMainLooper()).post(new Runnable() {
                    public void run() {
                        if (isActive()) {
                            listener.onConnected(RespokeCall.this);
                        }
                    }
                });
            }
        }
    }
338909
public RetryPolicy<R> onRetriesExceeded(CheckedConsumer<? extends ExecutionCompletedEvent<R>> listener) {
    retriesExceededListener = EventListener.of(Assert.notNull(listener, "listener"));
    return this;
  }
777997
@Override
    public void onReceive(Object message) {
        if (message instanceof NewMessage) {
            NewMessage newMessage = (NewMessage) message;
            onNewMessage(newMessage.getPeer(), newMessage.getSender(), newMessage.getSortDate(),
                    newMessage.getContentDescription(), newMessage.getHasCurrentUserMention(),
                    newMessage.getUnreadMessagesCount(), newMessage.getUnreadDialogsCount());
        } else if (message instanceof MessagesRead) {
            MessagesRead read = (MessagesRead) message;
            onMessagesRead(read.getPeer(), read.getFromDate());
        } else if (message instanceof PauseNotifications) {
            onNotificationsPaused();
        } else if (message instanceof ResumeNotifications) {
            onNotificationsResumed();
        } else {
            super.onReceive(message);
        }
    }
244266
@Override
    public Message receiveNoWait() throws JMSRuntimeException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "receiveNoWait");

        Message message = null;

        try {
            message = messageConsumer.receiveNoWait();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "receiveNoWait", new Object[] { message });
        }
        return message;
    }
1103031
def __signalReceived(self, *args):
        """"""
        if self.__disconnecting:
            return
        with self.__lock:
            self.__args = args
            if self.__rateLimit == 0:
                self.__timer.stop()
                self.__timer.start((self.__delay * 1000) + 1)
            else:
                now = time.time()
                if self.__lastFlushTime is None:
                    leakTime = 0
                else:
                    lastFlush = self.__lastFlushTime
                    leakTime = max(0, (lastFlush + (1.0 / self.__rateLimit)) - now)

                self.__timer.stop()
                # Note: original was min() below.
                timeout = (max(leakTime, self.__delay) * 1000) + 1
                self.__timer.start(timeout)
1276905
private void notifyMessageReceived(boolean lastInBatch)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "notifyMessageReceived", lastInBatch);

      if (lastInBatch)
      {
         batchesReceived++;
         batchesReady++;
      }

      messagesReceived++;

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "notifyMessageReceived");
   }
1163713
@JmxGetter(name = "lastSwapped", description = "Time in milliseconds since the store was swapped")
    public long getLastSwapped() {
        long timeSinceLastSwap = System.currentTimeMillis() - lastSwapped;
        return timeSinceLastSwap > 0 ? timeSinceLastSwap : 0;
    }
772082
public com.google.api.ads.admanager.axis.v201811.CanoeSyncResult getLastSyncResult() {
        return lastSyncResult;
    }
37990
public static <T> T getLast(@javax.annotation.Nonnull final Stream<T> stream) {
    final List<T> collect = stream.collect(Collectors.toList());
    final T last = collect.get(collect.size() - 1);
    return last;
  }
1374109
def totalBytesReceived()
            joinThread()
            v = MiniUPnP.UPNP_GetTotalBytesReceived(@urls.controlURL_CIF,
                        @data.servicetype_CIF)
            if v < 0 then
                raise UPnPException.new, "Error while retriving total bytes received."
            end
            return v
        end
690482
@Override
	protected final AbstractMessage receiveFromDestination(long timeout, boolean duplicateRequired) throws JMSException
    {
        if (closed)
            return null; // [JMS SPEC]

        // Get something from preftech queue
        return getFromPrefetchQueue(timeout);
    }
920189
private synchronized ReceiveAllowedThread getReceiveAllowedThread(DestinationHandler destinationHandler)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getReceiveAllowedThread", destinationHandler);

        if (_receiveAllowedThread == null)
        {
            _receiveAllowedThread = new ReceiveAllowedThread(destinationHandler);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "getReceiveAllowedThread", _receiveAllowedThread);

            return _receiveAllowedThread;
        }

        _receiveAllowedThread.markForUpdate();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getReceiveAllowedThread", null);
        return null;
    }
132074
public Entry getLast()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getLast");     
      SibTr.exit(tc, "getLast", last);
    }

    return last;
  }
1254481
@Override
    public BaseDestinationHandler getResolvedDestinationHandler()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getResolvedDestinationHandler");

        BaseDestinationHandler resolvedDestinationHandler = _targetDestinationHandler.getResolvedDestinationHandler();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getResolvedDestinationHandler", resolvedDestinationHandler);

        return resolvedDestinationHandler;
    }