Places a browse message on the queue.
@see com.ibm.ws.sib.comms.client.proxyqueue.ProxyQueue#put(com.ibm.ws.sib.comms.common.CommsByteBuffer, short, boolean, boolean)
162343
public void put(CommsByteBuffer msgBuffer, short msgBatch, boolean lastInBatch, boolean chunk)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", new Object[]{msgBuffer, msgBatch, lastInBatch, chunk});
      
      QueueData queueData = null;
      // If this data represents a chunk we need to read the flags from the buffer. This 
      // will indicate to us whether we need to create some new queue data to stash on the 
      // queue or 
      if (chunk)
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Dealing with a chunked message");
         
         // Get the flags from the buffer
         byte flags = msgBuffer.get();
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Flags:", ""+flags);
         
         // Is this the first chunk?
         if ((flags & CommsConstants.CHUNKED_MESSAGE_FIRST) == CommsConstants.CHUNKED_MESSAGE_FIRST)
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "First chunk received");
            
            // If it is, create some new queue data to place on the queue with the initial
            // chunk
            queueData = new QueueData(this, lastInBatch, chunk, msgBuffer);
            
            // Put the data to the queue
            queue.put(queueData, msgBatch);
         }
         else
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Middle / Last chunk received");
            
            // Otherwise, we need to append to the chunks already collected. We do this by
            // finding the chunk to append to. This will be the last message on the queue
            // (i.e. at the back). This works for all cases as an async consumer cannot be
            // driven concurrently (so the last incomplete message on the queue will be the
            // one we want).
            boolean lastChunk = ((flags & CommsConstants.CHUNKED_MESSAGE_LAST) == CommsConstants.CHUNKED_MESSAGE_LAST);
            queue.appendToLastMessage(msgBuffer, lastChunk);
         }
      }
      else
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Dealing with the entire message");
         
         queueData = new QueueData(this, lastInBatch, chunk, msgBuffer);
         
         // Put the data to the queue
         queue.put(queueData, msgBatch);
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "put");
   }
252078
@Override
    public boolean putLocked(AbstractMessage message, LocalSession session, MessageLockSet locks) throws JMSException
    {
    	checkNotClosed();
    	checkTransactionLock();
    	
    	// Consistency check
    	if (!message.isInternalCopy())
    		throw new FFMQException("Message instance is not an FFMQ internal copy !","CONSISTENCY_ERROR");
    	
    	// Dispatch message to the adequate store
    	MessageStore targetStore;
    	if (message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT)
    	{
    	    // Use volatile store if possible, otherwise fallback to persistent store
    	    targetStore = volatileStore != null ? volatileStore : persistentStore;
    	}
    	else
    	    targetStore = persistentStore;
    	    
    	if (targetStore == null)
    	    throw new FFMQException("Queue does not support this delivery mode : "+
    	                            (message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT ? 
    	                            "DeliveryMode.NON_PERSISTENT" : "DeliveryMode.PERSISTENT"),
    	                            "INVALID_DELIVERY_MODE");
    	
    	int newHandle;
        synchronized (storeLock)
        {
            newHandle = targetStore.store(message);
            if (newHandle == -1)
            {
            	// No space left for this message in the target store
            	if (targetStore == volatileStore && persistentStore != null && queueDef.isOverflowToPersistent())
            	{
            		// Fallback to persistent store if possible
            		targetStore = persistentStore;
            		newHandle = targetStore.store(message);
            	}
 
            	// Cannot store the message anywhere
            	if (newHandle == -1)
            		throw new DataStoreFullException("Cannot store message : queue is full : "+getName());
            }
            
            targetStore.lock(newHandle);
        	locks.add(newHandle, targetStore.getDeliveryMode(), this, message);
        }
        
        if (message.getJMSDeliveryMode() == DeliveryMode.PERSISTENT && requiresTransactionalUpdate())
        {
        	pendingChanges = true;
        	return true;
        }
        else
        	return false;
    }
522820
protected WsByteBuffer[] putInt(int data, WsByteBuffer[] buffers) {
        return putBytes(GenericUtils.asBytes(data), buffers);
    }
1022938
public void put(int data)
    {
        // If the buffer is small.
        if (mBuffer.capacity() < (mLength + 1))
        {
            expandBuffer(mLength + ADDITIONAL_BUFFER_SIZE);
        }

        mBuffer.put((byte)data);
        ++mLength;
    }
829892
def put(self, storagemodel:object, modeldefinition = None) -> StorageQueueModel:
        
        try:
            message = modeldefinition['queueservice'].put_message(storagemodel._queuename, storagemodel.getmessage())
            storagemodel.mergemessage(message)

        except Exception as e:
            storagemodel = None
            msg = 'can not save queue message:  queue {} with message {} because {!s}'.format(storagemodel._queuename, storagemodel.content, e)
            raise AzureStorageWrapException(msg=msg)
           
        finally:
            return storagemodel
67486
public void put(final K key, final V value) {
		if (map.containsKey(key)) {
			// remove the key from the FIFO queue
			queue.remove(key);
		}

		while (queue.size() >= maxSize) {
			K oldestKey = queue.poll();
			if (null != oldestKey) {
				if (listener != null) {
					listener.onRemove(map.remove(oldestKey));
				} else {
					map.remove(oldestKey);
				}
			}
		}
		queue.add(key);
		map.put(key, value);
	}
1321110
public synchronized void put(final Object o) {
        final Bucket b = new Bucket(o);

        if (tail != null) {
            tail.setNext(b);
            tail = b;
        } else {
            // queue was empty but has one element now
            head = tail = b;
        }
        count++;

        // notify any waiting tasks
        notify();
    }
330543
@Override
	public void put(E e) throws InterruptedException {
		if (sizeLimit > 0){
	        final ReentrantLock lock = this.sizeLimitLock;
	        lock.lockInterruptibly();
	        try {
	            try {
	                while (size() >= sizeLimit)
	                    withinSizeLimit.await();
	            } catch (InterruptedException ie) {
	            	withinSizeLimit.signal(); // propagate to non-interrupted thread
	                throw ie;
	            }
	            queue.put(e);
	        } finally {
	            lock.unlock();
	        }
		}else{
			queue.put(e);
		}
	}
1345222
protected boolean putToQueue(IQueueMessage<ID, DATA> msg) {
        byte[] msgData = serialize(msg);
        Object pKey = msg instanceof IPartitionSupport ? ((IPartitionSupport) msg).getPartitionKey()
                : msg.getId();
        if (pKey == null) {
            pKey = msg.getId();
        }
        KafkaMessage kMsg = pKey != null ? new KafkaMessage(topicName, pKey.toString(), msgData)
                : new KafkaMessage(topicName, msgData);
        if (sendAsync) {
            return kafkaClient.sendMessageRaw(producerType, kMsg) != null;
        } else {
            return kafkaClient.sendMessage(producerType, kMsg) != null;
        }
    }
450152
public void put(Byte value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			this.compiledStatement.bindLong(compiledStatementBindIndex++, value);
		}
	}
1238109
public void putByte(int pos, byte b) {
		adaptSize(pos + 1);
		ByteBuffer bb = getBuffer(pos);
		int i = pos % _bufferSize;
		bb.put(i, b);
	}
1255306
public synchronized void putShort(short item)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putShort", Short.valueOf(item));

      checkValid();
      getCurrentByteBuffer(2).putShort(item);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "putShort");
   }
196793
private static int put(byte[] block, int offset, ByteBuffer buf) {
    int len = Math.min(block.length - offset, buf.remaining());
    buf.get(block, offset, len);
    return len;
  }
513413
public static void putShortLE(final byte[] array, final int offset, final short value) {
    array[offset    ] = (byte) (value       );
    array[offset + 1] = (byte) (value >>>  8);
  }
734612
protected void putShort(short data)
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "putShort", new Object[] { this, new Short(data)});

        if (tc.isDebugEnabled()) Tr.debug(tc, "Writing at position " + _buffer.position());
        _buffer.putShort(data);

        if (tc.isEntryEnabled()) Tr.exit(tc, "putShort");
    }
449952
boolean tryAdd(TaskMessage taskMsg) {
        if ((encodedLength + msgEncodeLength(taskMsg)) > buffer_size)
            return false;
        add(taskMsg);
        return true;
    }
1158353
public boolean put(SIMPMessage msg, boolean isOnItemStream)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "put", new Object[] { msg, Boolean.valueOf(isOnItemStream)});

    boolean returnValue = false;
    // chose small value for ArrayList initial size since typically not many new messages will be produced
    // during the short time this method is being executed
    ArrayList<AORequestedTick> satisfiedTicks = new ArrayList<AORequestedTick>(5);

    // We need to lock down the whole AOStream so that another thread can't jump in between
    // us satisfying the request and actually creating an AOValue and updating the AOStream.
    // Otherwise, the other thread may modify the latestTick value, based on their request,
    // and we'll put a 'future' tick as our 'previous' tick and end up with an inconsistent
    // stream.
    synchronized(parent) // AOStream
    {
      try
      {
        this.lock();
        try
        {
          if (closed)
          {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "put", Boolean.FALSE);
            return false;
          }
          if (!isOnItemStream)
          {
            // this should not really occur. we ought to log this error
            SIErrorException e =
              new SIErrorException(
                nls.getFormattedMessage(
                  "INTERNAL_MESSAGING_ERROR_CWSIP0001",
                  new Object[] {
                    "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint",
                    "1:713:1.43.2.26" },
                  null));
            FFDCFilter.processException(
              e,
              "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint.put",
              "1:718:1.43.2.26",
              this);
            SibTr.exception(tc, e);
            SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
              new Object[] {
                "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint",
                "1:724:1.43.2.26" });
  
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "put", Boolean.valueOf(false));
  
            return false; // we only accept recoverable messages
          }
          if (!isready)
          {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "put", Boolean.valueOf(false));
  
            return false; // no one is interested in a message
          }
  
          // set isready to false since ConsumerKey is no longer ready
          isready = false;
  
          // possibly someone interested in the message
          AORequestedTick rt = (AORequestedTick) listOfRequests.getFirst();
          if (rt == null)
          {
            // no request is waiting, so do nothing
          }
          else
          { // there is atleast one waiting request (which is !expired and !satisfied)
            boolean locked = false;
            try
            {
              locked = msg.lockItemIfAvailable(cks[0].getGetCursor(msg).getLockID());
            }
            catch(MessageStoreException e)
            {
              // FFDC
              FFDCFilter.processException(
                  e,
                  "com.ibm.ws.sib.processor.impl.JSRemoteConsumerPoint.put",
                  "1:761:1.43.2.26",
                  this);  
                          
              SibTr.exception(tc, e); 
              
              // TODO : We need a much wider handling of exception here and around this area. If anything
              // goes wrong we probably need to close off the consumerSession otherwise msgs could get "stuck"
              
            }
            // lock this particular message
            if (!locked)
              msg = null;
  
            if (msg != null)
            {
              AORequestedTick satTick = satisfyRequest(rt, msg);
              if (satTick != null)
                satisfiedTicks.add(satTick);
  
              rt = null;
              msg = null;
              returnValue = true; // the message was accepted
            }
            // At this point there are 2 possibilities: (1) msg == null && rt == null, or
            // (2) msg == null && rt != null. Case #2 occurs if the msg was not successfully locked.
  
            // while the ConsumerKey was not ready, many messages may have been made available but they were missed
            // so loop till either there are no more waiting requests, or there are no more available messages
            satisfiedTicks.addAll(processQueuedMsgs(rt));
  
          } // end else
        } // end this.lock()
        finally
        {
          this.unlock();
        }
      }
      catch(SINotPossibleInCurrentConfigurationException e)
      {
        // No FFDC code needed
        notifyException(e);
      }
      
      // inform parent about satisfied ticks - outside lock
      int length = satisfiedTicks.size();
      for (int i = 0; i < length; i++)
      {
        AORequestedTick aotick = (AORequestedTick) satisfiedTicks.get(i);
        parent.satisfiedRequest(aotick.tick, aotick.getMessage());
      }
    } // synchronized(parent)
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "put", Boolean.valueOf(returnValue));

    return returnValue;
  }