/*
@see com.ibm.wsspi.channelfw.objectpool.ObjectPool#put(java.lang.Object)
960901
@Override
    public Object put(Object object) {
        putCount++;
        long currentTime = CHFWBundle.getApproxTime();

        // get next free position, or oldest position if none free
        lastEntry++;
        // If last entry is past end of array, go back to the beginning
        if (lastEntry == poolSize) {
            lastEntry = 0;
        }
        Object returnVal = free[lastEntry]; // get whatever was in that slot for
                                            // return value
        free[lastEntry] = object;
        timeFreed[lastEntry] = currentTime;
        // if we overlaid the first/oldest entry, reset the first entry position
        if (lastEntry == firstEntry) {
            firstEntry++;
            if (firstEntry == poolSize) {
                firstEntry = 0;
            }
        }
        if (firstEntry == -1) { // if pool was empty before, this is first entry now
            firstEntry = lastEntry; // should always be at '0', this may
            // overwrite the oldest entry, in which case
            // the oldest one will be garbage collected
        }
        // if a return value is set, then the pool is full
        // NOTE: We do not call destroy on the local pool because returnVal will
        // be added to the main pool by TwoTier
        if (returnVal != null) {
            overflowCount++;
        }

        // check timestamp of oldest entry, and delete if older than 60 seconds
        // we should do a batch cleanup of all pools based on a timer rather than
        // waiting for a buffer to be released to trigger it, maybe in the next
        // release
        if (cleanUpOld) {
            while (firstEntry != lastEntry && currentTime > (timeFreed[firstEntry] + 60000L)) {
                if (destroyer != null && free[firstEntry] != null) {
                    destroyer.destroy(free[firstEntry]);
                }
                free[firstEntry] = null;
                firstEntry++;
                if (firstEntry == poolSize) {
                    firstEntry = 0;
                }
            }
        }

        if ((getCount + putCount) > adjustThreshold) {
            adjustPoolSize();
        }
        return returnVal;
    }
1176493
@Override
    public void put(String key, JSONObject value) throws KeeperException, InterruptedException {
        try {
            m_zk.create(ZKUtil.joinZKPath(m_rootNode, key), value.toString().getBytes(Constants.UTF8ENCODING),
                    Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
        } catch (KeeperException.NodeExistsException e) {
            m_zk.setData(ZKUtil.joinZKPath(m_rootNode, key), value.toString().getBytes(Constants.UTF8ENCODING), -1);
        }
    }
1331180
public Object put(Object name, Object value) 
    {
        return super.put(name,LazyList.add(null,value));
    }
722708
public Object put(String key, Object value) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", new Object[]{key, PasswordUtils.replaceValueIfKeyIsPassword(key,value)});

    // If the value is null (which is allowed for a Map Message) we can't tell
    // quickly whether the item is already in the map as null, or whether it doesn't exist,
    // so we just assume it will cause a change.
    // For properties we will never get a value of null, and it is properties we are really concerned with.
    if ((!changed)&& (value != null)) {
      Object old = get(key);
      if (value.equals(old)) {          // may as well call equals immediately, as it checks for == and we know value!=null
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put",  "unchanged");
        return old;
      }
      else {
        changed = true;
        Object result = copyMap().put(key, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
        return result;
      }
    }
    else {
      changed = true;
      Object result = copyMap().put(key, value);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
      return result;
    }
  }
1321560
public void put(DBObject key, Object object) {
        //noinspection unchecked
        objectCache.put(flatten(key.toMap()), new WeakReference(object));
    }
906753
public int put(Object key, int value)
  {
    if (key == null)
      key = NULL_KEY;

    synchronized (this) {
      int hash = key.hashCode() & _mask;

      for (Item item = _entries[hash]; item != null; item = item._next) {
        Object testKey = item._key;

        if (testKey == key || testKey.equals(key)) {
          int oldValue = item._value;

          item._value = value;

          return oldValue;
        }
      }

      Item item = new Item(key, value);
      item._next = _entries[hash];

      _entries[hash] = item;

      _size++;
    }

    return NULL;
  }
991618
public Object put(int key, Object value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "put");
        }
        if (value == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "value == null");
            }
            throw new NullPointerException("Missing value");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "key " + key);
        }
        // check the table
        FastSyncHashBucket bucket = getBucket(key);
        Object retVal = syncGetValueFromBucket(bucket, key, false);
        if (retVal != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "put: key is already defined in bucket...returning value from bucket and new key value will be discarded.");
            return retVal;
        }
        // new entry
        FastSyncHashEntry e = new FastSyncHashEntry(key, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "put: put new key and value into bucket");
        }
        return syncPutIntoBucket(bucket, e);
    }
1066350
@Override
    public V put(Block<?, ?> block, V value) {
        @SuppressWarnings("unchecked")
        V old = (V) storage[block.getId()];
        storage[block.getId()] = value;
        return old;
    }
200557
@Override
  public Object put(List<Map.Entry> batch) throws InterruptedException {
    if (initializeClusterSource()) {
      return clusterSource.put(batch);
    }
    return null;
  }
873746
public final Object put(Object key, Object value) {
        return internalData.put(key, value);
    }
1360119
@Override
    public Object put(String key, Object value) {
        DeserializationState deserializationState = _deserState.get();
        if (deserializationState.isDeserialized()) {
            return deserializationState.deserialized.put(key, value);
        }
        return deserializationState.overrides.put(key, value);
    }
973620
public JSONObject put(String key, Collection<?> value) throws JSONException {
		this.put(key, new JSONArray(value));
		return this;
	}
400809
@SuppressWarnings("unchecked")
    @Override
    public Object put(Object key, Object value) {
        if (MESSAGE_LOCALE.equals(key)) {
            if (value instanceof Locale) {
                locale = (Locale) value;
                data.put(MESSAGE_LOCALE, value);
            } else {
                throw new IllegalArgumentException();
            }
            if (installKernelMap != null)
                installKernelMap.put(key, value);
            return value;
        }
        if (installKernelMap == null) {
            if (RUNTIME_INSTALL_DIR.equals(key)) {
                if (value instanceof File) {
                    return data.put(RUNTIME_INSTALL_DIR, value);
                } else {
                    throw new IllegalArgumentException();
                }
            } else if (INSTALL_MAP_JAR.equals(key)) {
                if (value instanceof String) {
                    return data.put(INSTALL_MAP_JAR, value);
                } else {
                    throw new IllegalArgumentException();
                }
            } else if (INSTALL_MAP_JAR_FILE.equals(key)) {
                if (value instanceof File) {
                    return data.put(INSTALL_MAP_JAR_FILE, value);
                } else {
                    throw new IllegalArgumentException();
                }
            } else if (OVERRIDE_JAR_BUNDLES.equals(key)) {
                if (value instanceof List) {
                    return data.put(OVERRIDE_JAR_BUNDLES, value);
                } else {
                    throw new IllegalArgumentException();
                }
            } else {
                data.put(INSTALL_KERNEL_INIT_CODE, ERROR);
                data.put(INSTALL_KERNEL_INIT_ERROR_MESSAGE, getMessage("MAPBASED_ERROR_KERNEL_NOT_INIT"));
                throw new RuntimeException(getMessage("MAPBASED_ERROR_KERNEL_NOT_INIT"));
            }
        } else {
            return installKernelMap.put(key, value);
        }
    }
220967
public JSONObject put(String key, Map<?, ?> value) throws JSONException {
		this.put(key, new JSONObject(value));
		return this;
	}
272615
public Object put(String key, Object value) {
		if (size == keys.length) {
			throw new ArrayIndexOutOfBoundsException(size);
		}
		keys[size] = key;
		values[size] = value;
		size++;
		return value;
	}
1090416
private Object put(String name, Class<?> beanClass, boolean isSingleton) {
        BeanDefine beanDefine = this.createBeanDefine(beanClass, isSingleton);

        if (pool.put(name, beanDefine) != null) {
            log.warn("Duplicated Bean: {}", name);
        }

        // add interface、put to pool
        Class<?>[] interfaces = beanClass.getInterfaces();
        if (interfaces.length > 0) {
            for (Class<?> interfaceClazz : interfaces) {
                if (null != this.getBean(interfaceClazz)) {
                    break;
                }
                this.put(interfaceClazz.getName(), beanDefine);
            }
        }

        return Objects.requireNonNull(beanDefine).getBean();
    }
919134
@Override
    public Object put(String name, Object value) {
        if (bean != null) {
            Object oldValue = get(name);
            Method method = getWriteMethod(name);
            if (method == null) {
                throw new IllegalArgumentException("The bean of type: " + bean.getClass().getName() + " has no property called: " + name);
            }
            try {
                Object[] arguments = createWriteMethodArguments(method, value);
                method.invoke(bean, arguments);

                Object newValue = get(name);
                firePropertyChange(name, oldValue, newValue);
            } catch (InvocationTargetException e) {
                throw new IllegalArgumentException(e.getMessage());
            } catch (IllegalAccessException e) {
                throw new IllegalArgumentException(e.getMessage());
            }
            return oldValue;
        }
        return null;
    }