Package com.caucho.bam.packet

Examples of com.caucho.bam.packet.Packet


      // remove item from queue
      if (_head.compareAndSet(head, next)) {
        _size.decrementAndGet();

        Packet packet = next.getPacket();
        next.clearPacket();

        // wake any blocked threads
        if (_blockCount.get() > 0 && _size.get() < _blockMaxSize) {
          synchronized (_blockLock) {
View Full Code Here


  public long runTask()
  {
    _isRunning = true;

    try {
      Packet packet;
   
      while ((packet = _queue.dequeue()) != null) {
        if (log.isLoggable(Level.FINEST))
          log.finest(this + " dequeue " + packet);
View Full Code Here

    return true;
  }
 
  private void deliverStartupPackets()
  {
    Packet packet;
   
    while ((packet = extractStartupPacket()) != null) {
      Mailbox mailbox = getMailbox(packet.getTo());
     
      if (mailbox != null)
        packet.dispatch(mailbox, this);
      else {
        log.warning(this + " failed to find mailbox " + packet.getTo()
                    + " for " + packet);
      }
    }
  }
View Full Code Here

  {
    synchronized (_startupPacketList) {
      int size = _startupPacketList.size();
     
      for (int i = 0; i < size; i++) {
        Packet packet = _startupPacketList.get(i);
       
        Mailbox mailbox = getMailbox(packet.getTo());
       
        if (mailbox != null) {
          _startupPacketList.remove(i);
         
          return packet;
View Full Code Here

TOP

Related Classes of com.caucho.bam.packet.Packet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.