Github user VladRodionov commented on a diff in the pull request:

    https://github.com/apache/incubator-ratis/pull/4#discussion_r212154701
  
    --- Diff: 
ratis-logservice/src/main/java/org/apache/ratis/logservice/api/RecordListener.java
 ---
    @@ -0,0 +1,19 @@
    +package org.apache.ratis.logservice.api;
    +
    +import java.nio.ByteBuffer;
    +import java.util.concurrent.CompletableFuture;
    +
    +/**
    + * Interface that, when registered with a {@link LogStream}, will receive 
all records written
    + * to that LogStream until it is removed.
    + */
    +public interface RecordListener {
    +
    +  /**
    +   * Processes the written record from the LogStream.
    +   *
    +   * @param record The record
    +   */
    +  CompletableFuture<Void> receiveRecord(ByteBuffer record);
    --- End diff --
    
    Again, do not break Listener contract - its synchronous. 


---

Reply via email to