コード例 #1
0
 private INodeAttributes findByPrimaryKey(INodeAttributes.Finder qfinder, Object[] params)
     throws StorageCallPreventedException, StorageException {
   final int inodeId = (Integer) params[0];
   INodeAttributes result = null;
   if (contains(inodeId)) {
     result = get(inodeId);
     hit(qfinder, result, "inodeid", inodeId);
   } else {
     aboutToAccessStorage(qfinder, params);
     result = dataAccess.findAttributesByPk(inodeId);
     gotFromDB(inodeId, result);
     miss(qfinder, result, "inodeid", inodeId, "size", size());
   }
   return result;
 }
コード例 #2
0
 private Collection<INodeAttributes> findByPrimaryKeys(
     INodeAttributes.Finder qfinder, Object[] params)
     throws StorageCallPreventedException, StorageException {
   final List<INodeCandidatePrimaryKey> inodePks = (List<INodeCandidatePrimaryKey>) params[0];
   Collection<INodeAttributes> result = null;
   if (contains(inodePks)) {
     result = get(inodePks);
     hit(qfinder, result, "inodeids", inodePks);
   } else {
     aboutToAccessStorage(qfinder, inodePks);
     result = dataAccess.findAttributesByPkList(inodePks);
     gotFromDB(result);
     miss(qfinder, result, "inodeids", inodePks);
   }
   return result;
 }
コード例 #3
0
 @Override
 public void prepare(TransactionLocks tlm) throws TransactionContextException, StorageException {
   Collection<INodeAttributes> modified = new ArrayList<INodeAttributes>(getModified());
   modified.addAll(getAdded());
   dataAccess.prepare(modified, getRemoved());
 }