Esempio n. 1
0
 private Collection<INodeAttributes> get(List<INodeCandidatePrimaryKey> iNodeCandidatePKs) {
   Collection<INodeAttributes> iNodeAttributeses =
       new ArrayList<INodeAttributes>(iNodeCandidatePKs.size());
   for (INodeCandidatePrimaryKey pk : iNodeCandidatePKs) {
     iNodeAttributeses.add(get(pk.getInodeId()));
   }
   return iNodeAttributeses;
 }
Esempio n. 2
0
 private boolean contains(List<INodeCandidatePrimaryKey> iNodeCandidatePKs) {
   for (INodeCandidatePrimaryKey pk : iNodeCandidatePKs) {
     if (!contains(pk.getInodeId())) {
       return false;
     }
   }
   return true;
 }
Esempio n. 3
0
  private void updateAttributes(
      INodeCandidatePrimaryKey trg_param, List<INodeCandidatePrimaryKey> toBeDeletedSrcs)
      throws TransactionContextException {
    toBeDeletedSrcs.remove(trg_param);
    for (INodeCandidatePrimaryKey src : toBeDeletedSrcs) {
      if (contains(src.getInodeId())) {
        INodeAttributes toBeDeleted = get(src.getInodeId());
        INodeAttributes toBeAdded = clone(toBeDeleted, trg_param.getInodeId());

        remove(toBeDeleted);
        log("snapshot-maintenance-removed-inode-attribute", "inodeId", toBeDeleted.getInodeId());

        add(toBeAdded);
        log("snapshot-maintenance-added-inode-attribute", "inodeId", toBeAdded.getInodeId());
      }
    }
  }