@Override // SnapshotStatsMXBean public SnapshotInfo.Bean[] getSnapshots() { List<SnapshotInfo.Bean> beans = new ArrayList<SnapshotInfo.Bean>(); for (INodeDirectory d : getSnapshottableDirs()) { for (Snapshot s : d.getDirectorySnapshottableFeature().getSnapshotList()) { beans.add(toBean(s)); } } return beans.toArray(new SnapshotInfo.Bean[beans.size()]); }
public static SnapshotInfo.Bean toBean(Snapshot s) { return new SnapshotInfo.Bean( s.getRoot().getLocalName(), s.getRoot().getFullPathName(), s.getRoot().getModificationTime()); }
/** * Return the list of snapshots * * @return the list of snapshots */ public SnapshotInfo.Bean[] getSnapshots();