title: Populating entries in ConcurrentMap<String, CompletableFuture<Object>> in java
body: <p>I am starting with the concept of <code>CompletableFuture</code> in java. I have a use case where I need to populate a values in <code>Map&lt;String, CompletableFuture&lt;Object&gt;&gt;</code>.</p>
  <p>Assuming there is a Student entity class and a <code>ConcurrentMap&lt;String, CompletableFuture&lt;Student&gt;&gt;</code>. I tried to populate student entries into the map in following way:</p>
  <pre><code>Student student = new Student();
  ConcurrentMap&lt;String, CompletableFuture&lt;Student&gt;&gt; studentMap = new ConcurrentMap&lt;&gt;();
  
  CompletableFuture&lt;Student&gt; studentcf = new CompletableFuture&lt;&gt;();
  studentcf.complete(student); // Not sure whether it is the right way to convert a entity into CompletableFuture
  
  studentMap.put(&quot;Alex&quot;, studentcf);
  </code></pre>
  <p>The above solution worked but I am not sure whether it is the right way to do this (converting the entity to CompletableFuture). Can someone please suggest me the right way to do the above scenario?</p>
  <p>Any suggestions will be helpful!! Thanks in advance!!</p>