@Override
  public KeyValueIterator<K, V> all() {
    final Iterator<Map.Entry<K, V>> iterator = map.entrySet().iterator();
    return new KeyValueIterator<K, V>() {
      @Override
      public void close() {
        //not applicable
      }

      @Override
      public boolean hasNext() {
        return iterator.hasNext();
      }

      @Override
      public Entry<K, V> next() {
        Map.Entry<K, V> kv = iterator.next();
        return new Entry<>(kv.getKey(), kv.getValue());
      }

      @Override
      public void remove() {
        iterator.remove();
      }

    };
  }
Implements a {@link KeyValueStore} using an in-memory Java Map.
@param <K>  the type of key
@param <V>  the type of value

TODO: This class is a stop-gap until we implement persistent store creation from TaskContext.
samza-core/src/main/java/org/apache/samza/operators/util/InternalInMemoryStore.java