core/src/main/java/com/orientechnologies/common/collection/closabledictionary/OClosableLinkedContainer.java
public void add(K key, V item) throws InterruptedException {
    if (!item.isOpen())
      throw new IllegalArgumentException("All passed in items should be in open state");

    checkOpenFilesLimit();

    final OClosableEntry<K, V> closableEntry = new OClosableEntry<K, V>(item);
    final OClosableEntry<K, V> oldEntry = data.putIfAbsent(key, closableEntry);

    if (oldEntry != null) {
      throw new IllegalStateException("Item with key " + key + " already exists");
    }

    logAdd(closableEntry);
  }
public void add(K key, V item) throws InterruptedException {
    if (!item.isOpen())
      throw new IllegalArgumentException("All passed in items should be in open state");

    checkOpenFilesLimit();

    final OClosableEntry<K, V> closableEntry = new OClosableEntry<K, V>(item);
    final OClosableEntry<K, V> oldEntry = data.putIfAbsent(key, closableEntry);

    if (oldEntry != null) {
      throw new IllegalStateException("Item with key " + key + " already exists");
    }

    logAdd(closableEntry);
  }
public void add ( K key , V item ) throws InterruptedException { if ( ! item . isOpen ( ) ) throw new IllegalArgumentException ( "All passed in items should be in open state" ) ; checkOpenFilesLimit ( ) ; final OClosableEntry < K , V > closableEntry = new OClosableEntry < K , V > ( item ) ; final OClosableEntry < K , V > oldEntry = data . putIfAbsent ( key , closableEntry ) ; if ( oldEntry != null ) { throw new IllegalStateException ( "Item with key " + key + " already exists" ) ; } logAdd ( closableEntry ) ; }
Adds item to the container.
Item should be in open state.

@param key  Key associated with given item.
@param item Item associated with passed in key.
Adds item to the container . Item should be in open state .