/*
(non-Javadoc)

@see com.ibm.ws.objectManager.Map#put(java.lang.Object, com.ibm.ws.objectManager.Token,
com.ibm.ws.objectManager.Transaction)
181779
public Token put(Object key,
                     Token value,
                     Transaction transaction)
                    throws ObjectManagerException
    {
        throw new UnsupportedOperationException();
    }
101809
@Override
    // TODO: what happens if pushAll and key already exists?
    public Object put(Object key, Object value) {
        verifyOperation($set);

        return updates.put(getKeyForUpdate(key), DBObjectUtil.toDBObject(value));
    }
1013437
@Override
    public Object put(Object key, Object value) {
        return localMap.put(key, value);
    }
513935
public boolean add(Token token,
                       Transaction transaction)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "add",
                        new Object[] { token, transaction });

        List.Entry newEntry = null;
        // Lock the tailSequenceNumber until the new link is in the list.
        // This prevents the possibility that after we had incremented the tail sequence number
        // but before we had added it to the subList some thread resets the headSequenceNumber 
        // and skipped passed the link we just added.
        synchronized (transaction.internalTransaction) {
            tailSequenceNumberLock.lock();
            try {
                if (!tailSequenceNumberSet)
                    resetTailSequenceNumber();
                // Establish the sequenceNumber of this Object in the overall list.
                long usableTailSequenceNumber = ++tailSequenceNumber;

                // Figure out which subList the Object should be added to.
                ConcurrentSubList list = getSublist(usableTailSequenceNumber);
                // Add the link near the tail of the list according to its assigned
                // sequence number.
                newEntry = list.addEntry(token,
                                         transaction,
                                         usableTailSequenceNumber,
                                         this);
            } finally {
                if (tailSequenceNumberLock.isHeldByCurrentThread())
                    tailSequenceNumberLock.unlock();
            } // try (tailSequenceNumberLock).
        } // synchronized (transaction.internalTransaction).

        boolean modified = (newEntry != null);
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "add",
                       new Object[] { new Boolean(modified) });
        return modified;
    }
803082
private void put(Object obj, Element node) throws Exception {
		if (!(obj instanceof Map)) {
			throw new IllegalArgumentException("Object for put is not a Map: "
					+ obj);
		}
		@SuppressWarnings("unchecked")
		Map<Object, Object> map = (Map<Object, Object>) obj;

		String name = getAttribute(node, "name");
		Object value = value(obj, node);
		map.put(name, value);
		if (LOG.isDebugEnabled()) {
			LOG.debug("XML " + obj + ".put(" + name + "," + value + ")");
		}
	}
657050
public void put(String key, Object object) {
//        canWrite() TODO disabled for now;

        updateModifiedDate();
        user_data.put(key,object);

//        if(isCollection(object)){
//            Object[] array = ((Collection) object).toArray(new Object[0]);
//            user_data.put(key, array);
//        }
//        else if(isArray(object)){
//            Object[] array = (Object[]) object;
//            user_data.put(key, array);
//        } else {
//            user_data.put(key,object);
//        }
    }
435818
@Override
    public R put(D key, R value) {
        return map.put(key, value);
    }
584400
@Override
  public Object put(String key, Object val) {
    val = val != null && val instanceof Number ? Number.class.cast(val).intValue() : val;
    return super.put(key, val);
  }
885622
@Override
	public void put(Object entity) {
		if (entity == null) {
			throw new IllegalArgumentException("'entity' must not be [" + entity + "]");
		}
		
		if (operation != null) {
			throw new IllegalStateException("Log [" + operation + "] -> ["
					+ Log.Operation.PUT
					+ "] is not allowed: This operation must be first");
		}
		
		Key id = Keys.create(Translation.toKind(entity.getClass()), Entities.keyValue(entity));
		Entity e = datastore.get(local, id);
		
		if (e != null) {
			throw new EntityExistsException(id);
		}
		
		this.entity = entity;
		operation = Log.Operation.PUT;
	}
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;
  }
306557
public Response put(String filePath, String key, String token) throws QiniuException {
        return put(filePath, key, token, null, null, false);
    }
873746
public final Object put(Object key, Object value) {
        return internalData.put(key, value);
    }
1068477
public Object put(Object key, Object value)
    {
        if (null == key) throw new IllegalArgumentException("key must not be null");
        if (!(key instanceof String)) throw new IllegalArgumentException("key must be a String");

        if (!isValidObject(value))
        {
            if (value != null)
            {
                throw new IllegalArgumentException("Invalid type of value.  Type: [" + value.getClass().getName() + "] with value: [" + value.toString() + "]");
            }
            else
            {
                throw new IllegalArgumentException("Invalid type of value.");
            }
        }
        return super.put(key, value);
    }
602222
public boolean add(Token token,
                       Transaction transaction)
                    throws ObjectManagerException
    {
        addEntry(token, transaction);
        return true;
    }
985883
@Override
	public void put(Object entity) {
		ResourceManager<Transaction> manager = new AppEngineResourceManager(
				datastore, datastore.beginTransaction(), transaction);
		manager.put(entity);
		Log log = new Log(transaction.logs().size() + 1, Log.Operation.PUT, entity);
		log.state(State.UNCOMMITTED);
		transaction.logs().add(log);
		managers.put(keyValue(entity), manager);
		logger.fine("Transaction [" + transaction.id() + "]: Entity [" + entity + "] has been put");
	}
1353290
@RequiresTransaction
    public void put( String key,
                     Document document ) {
        database.put(key, document);
    }
200070
public OtpErlangObject put(final OtpErlangObject key,
            final OtpErlangObject value) {
        return map.put(key, value);
    }