@Override
  public final List<WAL> getWALs() {
    List<WAL> wals = new ArrayList<WAL>();
    numRemoteWALUnderCreationLock.lock();
    try {
      while (numRemoteWALUnderCreation > 0) {
        noRemoteWALUnderCreationCond.awaitUninterruptibly();
      }
      peerId2WAL.values().stream().filter(Optional::isPresent).map(Optional::get)
        .forEach(wals::add);
    } finally {
      numRemoteWALUnderCreationLock.unlock();
    }
    return Streams
      .concat(peerId2WAL.values().stream().filter(Optional::isPresent).map(Optional::get),
        getWALs0().stream())
      .collect(Collectors.toList());
  }
Base class for a WAL Provider.
<p>
We will put some common logic here, especially for sync replication implementation, as it must do
some hacks before the normal wal creation operation.
<p>
All {@link WALProvider} implementations should extends this class instead of implement
{@link WALProvider} directly, except {@link DisabledWALProvider}.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractWALProvider.java