/**
   * @param ignite Ignite instance.
   * @param ccfg Cache configuration.
   * @return Data transfer object for cache store configuration properties.
   */
  public static VisorCacheStoreConfiguration from(Ignite ignite, CacheConfiguration ccfg) {
    VisorCacheStoreConfiguration cfg = new VisorCacheStoreConfiguration();

    GridCacheAdapter<Object, Object> c = ((IgniteKernal) ignite).internalCache(ccfg.getName());

    CacheStore store =
        c != null && c.context().started() ? c.context().store().configuredStore() : null;

    cfg.jdbcStore = store instanceof CacheAbstractJdbcStore;

    cfg.store = compactClass(store);
    cfg.storeFactory = compactClass(ccfg.getCacheStoreFactory());

    cfg.readThrough = ccfg.isReadThrough();
    cfg.writeThrough = ccfg.isWriteThrough();

    cfg.writeBehindEnabled = ccfg.isWriteBehindEnabled();
    cfg.batchSz = ccfg.getWriteBehindBatchSize();
    cfg.flushFreq = ccfg.getWriteBehindFlushFrequency();
    cfg.flushSz = ccfg.getWriteBehindFlushSize();
    cfg.flushThreadCnt = ccfg.getWriteBehindFlushThreadCount();

    return cfg;
  }