code: public void addToCache(Data... toAdd) throws BucketContainerException, InterruptedException {
          if (shutDownInitiated) {
              throw new BucketContainerException("Shutdown was already initiated. Could not add the given elements.");
          }
          int throwBucketException = -1;
          for (AbstractKVStorable date : toAdd) {
              int indexOfCache = hashFunction.getBucketId(date.getKey());
              // safety first, check if the bucket exists. If not, try to move on. Throw exception at the end
              if (indexOfCache < buckets.length) {
                  Bucket<Data> bucket = buckets[indexOfCache];
                  // Blocking process, try to add element
                  while (!bucket.add(date)) {
                      Thread.sleep(1000);
                  }
              } else {
                  throwBucketException = indexOfCache;
              }
          }
  
          if (throwBucketException != -1) {
              throw new BucketContainerException("Could not insert at least one LinkData-object. One missing bucket was "
                      + throwBucketException);
          }
      }
docs: Add the given records to the {@link Bucket}s, if possible. If all {@link Bucket}s are full the method is
  blocking.
  
  @param toAdd
  the data to add
  @throws BucketContainerException
  @throws InterruptedException