/** * Retrieves a set with the name of the files with a specific ReplicaStoreState in a specific * replica. * * @param rep The replica where the files belong. * @param state The ReplicaStoreState for the files. * @return A set with the names of the files with a specific ReplicaStoreState in a specific * replica. * @throws ArgumentNotValid If the Replica or the ReplicaStoreState is null. */ @Override public Set<String> getAllFileNames(Replica rep, ReplicaStoreState state) throws ArgumentNotValid { ArgumentNotValid.checkNotNull(rep, "Replica rep"); ArgumentNotValid.checkNotNull(state, "ReplicaStoreState state"); // initialise the set Set<String> res = new HashSet<String>(); // put the collection of filenames into the set. res.addAll(database.retrieveFilenamesForReplicaEntries(rep.getId(), state)); // return the set. return res; }