class GridCacheLoaderWriterStoreFactory<K, V> implements Factory<CacheStore<K, V>> {
    /** */
    private static final long serialVersionUID = 0L;

    /** */
    private final Factory<CacheLoader<K, V>> ldrFactory;

    /** */
    private final Factory<CacheWriter<K, V>> writerFactory;

    /**
     * @param ldrFactory Loader factory.
     * @param writerFactory Writer factory.
     */
    GridCacheLoaderWriterStoreFactory(@Nullable Factory<CacheLoader<K, V>> ldrFactory,
        @Nullable Factory<CacheWriter<K, V>> writerFactory) {
        this.ldrFactory = ldrFactory;
        this.writerFactory = writerFactory;

        assert ldrFactory != null || writerFactory != null;
    }

    /** {@inheritDoc} */
    @Override public CacheStore<K, V> create() {<FILL_FUNCTION_BODY>}

    /**
     * @return Loader factory.
     */
    Factory<CacheLoader<K, V>> loaderFactory() {
        return ldrFactory;
    }

    /**
     * @return Writer factory.
     */
    Factory<CacheWriter<K, V>> writerFactory() {
        return writerFactory;
    }
}

        CacheLoader<K, V> ldr = ldrFactory == null ? null : ldrFactory.create();

        CacheWriter<K, V> writer = writerFactory == null ? null : writerFactory.create();

        return new GridCacheLoaderWriterStore<>(ldr, writer);
    
<no_super_class>