src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java
branchJEP-349-branch
changeset 57380 6a7e7743b82f
parent 57377 528d85d2fce5
child 57386 acdd0dbe37ee
equal deleted inserted replaced
57378:2e35a025ebee 57380:6a7e7743b82f
   137      * @see #onEvent(String, Consumer)
   137      * @see #onEvent(String, Consumer)
   138      */
   138      */
   139     boolean remove(Object action);
   139     boolean remove(Object action);
   140 
   140 
   141     /**
   141     /**
   142      * Hint that the the event object in an {@link #onEvent(Consumer)} action
   142      * Hint that the event object in an {@link #onEvent(Consumer)} action
   143      * may be reused.
   143      * may be reused.
   144      * <p>
   144      * <p>
   145      * If reuse is set to
   145      * If reuse is set to {@code true), a callback should not keep a reference
   146      * {@code true), a callback should not keep a reference to the event object
   146      * to the event object after the callback from {@code onEvent} has returned.
   147      * after the callback from {@code onEvent} has returned.
   147      * <p>
   148      * <p>
   148      * By default reuse is set to {@code true}
   149      * By default reuse is {@code true}
   149      *
       
   150      * @param resuse if event objects can be reused between calls to {@code #onEvent(Consumer)}
   150      *
   151      *
   151      */
   152      */
   152     public void setReuse(boolean reuse);
   153     public void setReuse(boolean reuse);
       
   154 
       
   155     /**
       
   156      * Orders events in chronological order aft the end timestamp
       
   157      *
       
   158      * TODO: WHAT ABOUT EVENTS THAT OCCUR WAY OUT OF ORDER
       
   159      * <p>
       
   160      * By default ordered is set to {@code true}
       
   161      *
       
   162      * @param ordered if event objects arrive in chronological order to {@code #onEvent(Consumer)}
       
   163      */
       
   164     public void setOrdered(boolean ordered);
       
   165 
   153 
   166 
   154     /**
   167     /**
   155      * Starts processing events in the stream.
   168      * Starts processing events in the stream.
   156      * <p>
   169      * <p>
   157      * All actions will performed on this stream will happen in the current
   170      * All actions will performed on this stream will happen in the current