Adds provided item to the buffer and resets current {@code take}.
778929
public void add(@Nullable T item) throws Exception {
		if (exception == null) {
			if (take != null) {
				assert isEmpty();
				SettablePromise<T> take = this.take;
				this.take = null;
				take.set(item);
				if (exception != null) throw exception;
				return;
			}

			doAdd(item);
		} else {
			tryRecycle(item);
			throw exception;
		}
	}
1292016
def put_nowait(self, item: _T) -> None:
        
        self._consume_expired()
        if self._getters:
            assert self.empty(), "queue non-empty, why are getters waiting?"
            getter = self._getters.popleft()
            self.__put_internal(item)
            future_set_result_unless_cancelled(getter, self._get())
        elif self.full():
            raise QueueFull
        else:
            self.__put_internal(item)
478150
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            self._queue.push(session)
1044602
public synchronized void putItem(TopLevelItem item) throws IOException, InterruptedException {
        String name = item.getName();
        TopLevelItem old = items.get(name);
        if (old ==item)  return; // noop

        checkPermission(Item.CREATE);
        if (old!=null)
            old.delete();
        items.put(name,item);
        ItemListener.fireOnCreated(item);
    }
643728
public void put(E e) throws InterruptedException {
        Objects.requireNonNull(e);
        final ReentrantLock lock = this.lock;
        lock.lockInterruptibly();
        try {
            while (count == items.length)
                notFull.await();
            enqueue(e);
        } finally {
            lock.unlock();
        }
    }
1287113
public void addItem (int index, T item)
    {
        if (_items == null) {
            return;
        }
        _items.add(index, item);
    }
1058917
public void add(Item item)
    {
        Item innerItem = trie.get(item.key);
        if (innerItem == null)
        {
            innerItem = item;
            trie.put(innerItem.key, innerItem);
        }
        else
        {
            innerItem.combine(item);
        }
    }
704609
protected synchronized void reset(Connection connection,
                        ReceiveListener listener,
                        WsByteBuffer data,
                        int size,
                        int segmentType,
                        int requestNumber,
                        int priority,
                        boolean allocatedFromPool,
                        boolean partOfExchange,
                        Conversation conversation)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "reset",
                                           new Object[]
                                           {
                                              connection,
                                              listener,
                                              data,
                                              ""+size,
                                              ""+segmentType,
                                              ""+requestNumber,
                                              ""+priority,
                                              ""+allocatedFromPool,
                                              ""+partOfExchange,
                                              conversation
                                           });

      this.connection = connection;
      this.listener = listener;
      this.data = data;
      this.size = size;
      this.segmentType = segmentType;
      this.requestNumber = requestNumber;
      this.priority = priority;
      this.allocatedFromPool = allocatedFromPool;
      this.partOfExchange = partOfExchange;
      this.conversation = conversation;
      setDispatchable(null);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "reset");
   }
1118573
public void put(T item, String itemId) throws Exception
    {
        put(item, itemId, 0, null);
    }
225360
public void addReset(String label)
    {
        if (buttons==null)
            buttonsAtBottom();
        Element e = new Input(Input.Reset,"Reset",label);
        if (extendRow)
            addField(null,e);
        else
            buttons.add(e);
    }
354993
public void add(String item, String value) {

        int maxChar = MaxLenInZChoice;

        if (item.length() < MaxLenInZChoice) {
            maxChar = item.length();
        }

        super.add(item.substring(0, maxChar));
        values.addElement(value);
    }
1330573
public void reset()
    {
        this.bufferSize = 0;
        this.bufferPos = 0;
        this.bufferSizeAfterLimit = 0;
        this.currentLimit = Integer.MAX_VALUE;
        this.lastTag = 0;
        this.packedLimit = 0;
        this.sizeLimit = DEFAULT_SIZE_LIMIT;
        resetSizeCounter();
    }
1117947
def addlast(self, item, new_priority=None):
        """"""

        with self.lock:

            self_data = self.data
            maxlen = self._maxlen

            if maxlen is not None and maxlen == len(self_data):
                return

            try:
                priority = self_data[-1][1]
                if new_priority is not None:
                    if new_priority > priority:
                        raise ValueError('Priority must be <= '
                                         'lowest priority.')
                    else:
                        priority = new_priority
            except IndexError:
                priority = 0 if new_priority is None else new_priority

            self_data.append((item, priority))
            self_items = self.items

            try:
                self_items[item] += 1
            except TypeError:
                self_items[repr(item)] += 1
602503
public void add(T value) {
        Element<T> e = new Element<T>(value);
        queue.offer(e);
    }
937679
void addPendingChange(String key, String value) {
        this.addPendingChange(key, JsonValue.valueOf(value));
    }
619824
public void reset() {
		Element e = first;
		while( e != null ) {
			Element n = e.next;
			e.clear();
			available.add( e );
			e = n;
		}
		first = last = null;
		size = 0;
	}
865077
async def put(self, item):
        
        self._parent._check_closing()
        async with self._parent._async_not_full:
            self._parent._sync_mutex.acquire()
            locked = True
            try:
                if self._parent._maxsize > 0:
                    do_wait = True
                    while do_wait:
                        do_wait = (
                            self._parent._qsize() >= self._parent._maxsize
                        )
                        if do_wait:
                            locked = False
                            self._parent._sync_mutex.release()
                            await self._parent._async_not_full.wait()
                            self._parent._sync_mutex.acquire()
                            locked = True

                self._parent._put_internal(item)
                self._parent._async_not_empty.notify()
                self._parent._notify_sync_not_empty()
            finally:
                if locked:
                    self._parent._sync_mutex.release()