| 774 | private boolean updateFromOldTlogs(UpdateCommand cmd) { |
| 775 | return (cmd.getFlags() & UpdateCommand.REPLAY) != 0 && state == State.REPLAYING; |
| 776 | } |
| 777 | |
| 778 | public String[] getLogList(Path directory) { |
| 779 | final String prefix = TLOG_NAME + '.'; |
| 780 | try (Stream<Path> files = Files.list(directory)) { |
| 781 | return files |
| 782 | .map((file) -> file.getFileName().toString()) |
| 783 | .filter((name) -> name.startsWith(prefix)) |
| 784 | .sorted() |
| 785 | .toArray(String[]::new); |
| 786 | } catch (IOException e) { |
| 787 | throw new RuntimeException(e); |
| 788 | } |
| 789 | } |
| 790 | |