/** * Search for the snapshot whose id is 1) no less than the given id, * and 2) most close to the given id. */ public final int getSnapshotById(final int snapshotId) { D diff = getDiffById(snapshotId); return diff == null ? Snapshot.CURRENT_STATE_ID : diff.getSnapshotId(); }
/** * @return the inode corresponding to the given snapshot. * Note that the current inode is returned if there is no change * between the given snapshot and the current state. */ public A getSnapshotINode(final int snapshotId, final A currentINode) { final D diff = getDiffById(snapshotId); final A inode = diff == null? null: diff.getSnapshotINode(); return inode == null? currentINode: inode; }
/** * Search for the snapshot whose id is 1) no less than the given id, * and 2) most close to the given id. */ public final int getSnapshotById(final int snapshotId) { D diff = getDiffById(snapshotId); return diff == null ? Snapshot.CURRENT_STATE_ID : diff.getSnapshotId(); }
/** * @return the inode corresponding to the given snapshot. * Note that the current inode is returned if there is no change * between the given snapshot and the current state. */ public A getSnapshotINode(final int snapshotId, final A currentINode) { final D diff = getDiffById(snapshotId); final A inode = diff == null? null: diff.getSnapshotINode(); return inode == null? currentINode: inode; }
/** * Search for the snapshot whose id is 1) no less than the given id, * and 2) most close to the given id. */ public final int getSnapshotById(final int snapshotId) { D diff = getDiffById(snapshotId); return diff == null ? Snapshot.CURRENT_STATE_ID : diff.getSnapshotId(); }
/** * @return the inode corresponding to the given snapshot. * Note that the current inode is returned if there is no change * between the given snapshot and the current state. */ public A getSnapshotINode(final int snapshotId, final A currentINode) { final D diff = getDiffById(snapshotId); final A inode = diff == null? null: diff.getSnapshotINode(); return inode == null? currentINode: inode; }