src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/StreamConfiguration.java
branchJEP-349-branch
changeset 58197 0ef79bd7fb5c
parent 58180 0a8943b4d0dd
child 58200 2d147d680311
equal deleted inserted replaced
58193:baf88aa4f5db 58197:0ef79bd7fb5c
    21     Instant endTime = null;
    21     Instant endTime = null;
    22     boolean started = false;
    22     boolean started = false;
    23     long startNanos = 0;
    23     long startNanos = 0;
    24     long endNanos = Long.MAX_VALUE;
    24     long endNanos = Long.MAX_VALUE;
    25 
    25 
    26     volatile boolean changed = true;
    26     private volatile boolean changed = true;
    27 
    27 
    28     public synchronized boolean remove(Object action) {
    28     public synchronized boolean remove(Object action) {
    29         boolean removed = false;
    29         boolean removed = false;
    30         removed |= flushActions.removeIf(e -> e == action);
    30         removed |= flushActions.removeIf(e -> e == action);
    31         removed |= closeActions.removeIf(e -> e == action);
    31         removed |= closeActions.removeIf(e -> e == action);
    32         removed |= errorActions.removeIf(e -> e == action);
    32         removed |= errorActions.removeIf(e -> e == action);
    33         removed |= eventActions.removeIf(e -> e.action == action);
    33         removed |= eventActions.removeIf(e -> e.getAction() == action);
    34         if (removed) {
    34         if (removed) {
    35             changed = true;
    35             changed = true;
    36         }
    36         }
    37         return removed;
    37         return removed;
    38     }
    38     }
    94     }
    94     }
    95 
    95 
    96     public boolean hasChanged() {
    96     public boolean hasChanged() {
    97         return changed;
    97         return changed;
    98     }
    98     }
    99 
       
   100     public synchronized void clearChanged() {
       
   101         changed = false;
       
   102     }
       
   103 }
    99 }