(@NotNull Raft.Log log)
| 95 | } |
| 96 | |
| 97 | @Override |
| 98 | public boolean appendLog(@NotNull Raft.Log log) { |
| 99 | if (log.index != logCount) |
| 100 | throw new IllegalArgumentException("log.index(" + log.index + ") != logCount(" + logCount + ')'); |
| 101 | if (logMap.containsKey(log.key)) |
| 102 | return false; |
| 103 | long index = logCount; |
| 104 | int n = logs.length; |
| 105 | if (index >= n) |
| 106 | logs = Arrays.copyOf(logs, n * 2); |
| 107 | logs[(int)index] = log; |
| 108 | logCount = index + 1; |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | @Override |
| 113 | public void appendLogs(@NotNull Raft.Log @NotNull [] logs) { |
nothing calls this directly
no test coverage detected