/** * Might produce a caching version if caching is enabled. */ public AsyncDatastore asyncDatastore(final boolean enableGlobalCache) { if (this.entityMemcache != null && enableGlobalCache && this.registrar.isCacheEnabled()) return new CachingAsyncDatastore(asyncDatastore(), this.entityMemcache); else return asyncDatastore(); }
@Override public AsyncDatastoreReaderWriter asyncDatastore() { return factory.asyncDatastore(ofy.getOptions().isCache()); }
/** */ TransactorYes(final ObjectifyImpl current, final TransactorNo parentTransactor) { super(current); this.transaction = factory.asyncDatastore(current.getOptions().isCache()).newTransaction(this::committed); this.parentTransactor = parentTransactor; }