NucleusLogger.DATASTORE_NATIVE.debug("Getting entities for keys " + StringUtils.collectionToString(keys)); if (ec.getStatistics() != null) { ec.getStatistics().incrementNumReads();
/** * Method to actually perform the deletion of Entity(s) from the datastore. * @param ec ExecutionContext * @param keys Keys to delete */ public static void deleteEntitiesFromDatastore(ExecutionContext ec, List<Key> keys) { DatastoreService ds = ((DatastoreManager)ec.getStoreManager()).getDatastoreService(ec); if (NucleusLogger.DATASTORE_NATIVE.isDebugEnabled()) { NucleusLogger.DATASTORE_NATIVE.debug("Deleting entities with keys " + StringUtils.collectionToString(keys)); } if (ec.getStatistics() != null) { ec.getStatistics().incrementNumWrites(); } DatastoreTransaction txn = ((DatastoreManager)ec.getStoreManager()).getDatastoreTransaction(ec); if (txn == null) { if (keys.size() == 1) { ds.delete(keys.get(0)); } else { ds.delete(keys); } } else { Transaction innerTxn = txn.getInnerTxn(); if (keys.size() == 1) { ds.delete(innerTxn, keys.get(0)); } else { ds.delete(innerTxn, keys); } } }
private Object wrapEntityQueryResult(Iterable<Entity> entities, Function<Entity, Object> resultTransformer, DatastoreService ds, Cursor endCursor) { if (isBulkDelete()) { List<Key> keysToDelete = Utils.newArrayList(); for (Entity e : entities) { keysToDelete.add(e.getKey()); } if (NucleusLogger.DATASTORE_NATIVE.isDebugEnabled()) { NucleusLogger.DATASTORE_NATIVE.debug("Deleting entities with keys " + StringUtils.collectionToString(keysToDelete)); } if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumWrites(); } ds.delete(ds.getCurrentTransaction(null), keysToDelete); return (long) keysToDelete.size(); } return newStreamingQueryResultForEntities(entities, resultTransformer, endCursor, query); }
NucleusLogger.DATASTORE_NATIVE.debug("Performing batch get for keys " + StringUtils.collectionToString(qd.batchGetKeys)); if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumReads(); NucleusLogger.DATASTORE_NATIVE.debug("Deleting entities with keys " + StringUtils.collectionToString(keysToDelete)); if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumWrites(); NucleusLogger.DATASTORE_NATIVE.debug("Performing batch get for keys " + StringUtils.collectionToString(qd.batchGetKeys)); if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumReads();
if (ec.getStatistics() != null) { ec.getStatistics().incrementNumWrites();
if (ec.getStatistics() != null) { ec.getStatistics().incrementDeleteCount(); if (ec.getStatistics() != null) { ec.getStatistics().incrementDeleteCount();
if (ec.getStatistics() != null) { ec.getStatistics().incrementNumReads();
(System.currentTimeMillis() - startTime))); if (ec.getStatistics() != null) { ec.getStatistics().incrementUpdateCount();
(System.currentTimeMillis() - startTime))); if (ec.getStatistics() != null) { ec.getStatistics().incrementFetchCount();
NucleusLogger.DATASTORE_NATIVE.debug("Executing join query in datastore for " + query.toString()); if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumReads(); NucleusLogger.DATASTORE_NATIVE.debug("Executing query in datastore for " + query.toString()); if (getExecutionContext().getStatistics() != null) { getExecutionContext().getStatistics().incrementNumReads();
if (ec.getStatistics() != null) { ec.getStatistics().incrementInsertCount();
NucleusLogger.DATASTORE_NATIVE.debug("Getting entity of kind " + key.getKind() + " with key " + key); if (ec.getStatistics() != null) { ec.getStatistics().incrementNumReads();