title: GemfireRepository inserting List(Domain Class)
body: <p>I have scenario need to insert list of domain classes using <code>GemfireRepository</code> but it’s not available, where as, it is available in Cassandra using... </p>
  
  <pre><code>@Autowired
  private CassandraOperations cassandraTemplate;
  cassandraTemplate.insert(List&lt;DomainClass&gt;);
  </code></pre>
  
  <p>Follow-up Question...</p>
  
  <pre><code>@EnableAsync
  public class GenericWriter&lt;K, V&gt; extends CacheWriterAdapter&lt;K, V&gt; implements Declarable {
  
      private static Logger log = LoggerFactory.getLogger(GenericWriter.class);
  
      @Autowired
      private CassandraOperations cassandraOperations;
  
      ExecutorService executor = null;
  
      /**
       * Cache Writer get called before any event occurs on the cache, where in
       * EntryEvent interface reference has the helper methods
       */
      @Override
      @Async
      public void beforeCreate(EntryEvent&lt;K, V&gt; e) throws CacheWriterException {
  
          String eventOperation = e.getOperation().toString();
          log.info("#####inside before create#####");
          executor = Executors.newSingleThreadExecutor();
  
          executor.submit(() -&gt; {
              log.info("****inside submit*****");
              if (eventOperation.equals("CREATE")) {
                  log.info("Cache Writer for " + e.getRegion().getName() + " over Cassandra is activated"
                          + e.getNewValue());
                  try {
                      cassandraOperations.insert(e.getNewValue());
                  } catch (CassandraConnectionFailureException | CassandraWriteTimeoutException
                          | CassandraInternalException cassException) {
                      cassException.printStackTrace();
                      log.info("Cassandra Exception:" + cassException.toString());
                  }
                  catch (Exception ex){
                      log.info("Exception--------------------"+ex.getStackTrace());
                      ex.printStackTrace();
                  }
              }
          });
          executor.shutdown();
      }
  
      @Override
      public void init(Properties arg0) {
          // TODO Auto-generated method stub
  
      }
  }
  </code></pre>